I'm running the following code, using Visual Studio 2008 SP1, on Windows Vista Business x64, quad core machine, 8gb ram.
If I build a release build, and run it from the command line, it reports 31ms. If I then start it from the IDE, using F5, it reports 23353ms.
Here are the times: (all Win32 builds)
DEBUG, command line: 421ms
DEBUG...
I need to use a rails app from C++. I say login in the title because that's one of my options.
As far as I see it, I either need to do the standard login, and keep track of a session or something in the C++ code, or use an API token of sorts, and just pass that on every URL and never actually create a session on the rails side (which us...
If I have a snapin that extends Microsoft.ManagementConsole.Advanced.NamespaceExtension, is there anyway I can make this snapin contain some legacy C++ snapins?
...
How do I implement dependancy injection in C++ explicitly without using frameworks or reflection?
I could use a factory to return a auto_ptr or a shared_ptr. Is this a good way to do it?
...
I've got a fairly complex calculator that prints output when the user inputs ";" (and hits enter.) What I'm trying to do now is allow the user to print output when they hit enter, (without use of semicolon.) I need to know how I can implement this.
Side note: The calculator uses tokenization to read user input
This is part of the calcu...
Is okay to break all dependencies using interfaces just to make a class testable? It involves significant overhead at runtime because of many virtual calls instead of plain method invocations.
How does test driven development work in real world C++ applications? I read Working Effectively With Legacy Code and fond it quite useful but do...
On my machine (Quad core, 8gb ram), running Vista x64 Business, with Visual Studio 2008 SP1, I am trying to intersect two sets of numbers very quickly.
I've implemented two approaches in C++, and one in C#. The C# approach is faster so far, I'd like to improve the C++ approach so its faster than C#, which I expect C++ can do.
Here is t...
I need to embed the Flash player in a native application (C++) in a cross platform way (at least Windows and Mac OSX). I need to allow the Flash gui to make calls back to the native application to do things that Flash normally can’t do (e.g. write to the file system, talk to devices, loading native image processing libraries, etc). The A...
I am looking for a cross-platform C++ master/worker library or work queue library. The general idea is that my application would create some sort of Task or Work objects, pass them to the work master or work queue, which would in turn execute the work in separate threads or processes. To provide a bit of context, the application is a C...
I have been reading over some code lately and came across some lines such as:
somevar &= 0xFFFFFFFF;
What is the point of anding something that has all bits turned on; doesn't it just equal somevar in the end?
...
Hi there
I'm having problems compiling an open source C++ project on Fedora. When I download and run the ./configure I eventually end up with....
.
.
.
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
./configure: line 15513: AX_CFLAGS_WARN_ALL: command not fou...
Hi,
I have a class (EAGLView) which calls a method of a C++ class without problems. Now, the problem is that I need to call in that C++ class a objective-C function [context renderbufferStorage:GL_RENDERBUFFER fromDrawable:(CAEAGLLayer*)self.layer]; which I cannot do in C++ syntax.
I could wrap this Objective-C call to the same Objecti...
Hi all,
For my application (an MMC snap-in) I need to create a single native DLL containing strings that are localized into different languages. In other words, if you were to inspect this DLL with Visual Studio, you would see multiple string tables, each associated with a different locale but containing the same string IDs.
The approa...
This is the code:
struct comp
{
bool operator()(Reputation *one, Reputation *two)
{
if (one->Amount < 0 && two->Amount >= 0)
return false;
if (one->Amount >= 0 && two->Amount < 0)
return true;
if (one->Amount >= 0)
return one->Amount <= two->Amount;
else
return one->Amount >= two->Amount;
}
};
And this is the p...
Does anyone with experience with these libraries have any comment on which one they preferred? Were there any performance differences or difficulties in using?
...
How can I do it? It's an external window, not from my program. Thanks
...
I'd like to change the way some types are displayed using either 'dt' or '??' in a manner similar to how you can do that with autoexp.dat. Is there a way to do this?
For example, I have a structure something like this:
struct Foo
{
union Bar
{
int a;
void *p;
} b;
};
And I've got an array of a few hundred o...
I'm relatively new to C++ (about one year of experience, on and off). I'm curious about what led to the decision of type * name as the syntax for defining pointers. It seems to me that the syntax should be type & name as the & symbol is used everywhere else in code to refer to the variable's memory address. So, to use the traditional ...
In C++ what is the simplest way to add one day to a date in this format:
"20090629-05:57:43"
Probably using Boost 1.36 - Boost::date, Boost::posix_date or any other boost or std library functionality, I'm not interested in other libraries.
So far I came up with:
format the string (split date and time parts as string op) to be able t...
I'm just experimenting with boost::pool to see if its a faster allocator for stuff I am working with, but I can't figure out how to use it with boost::unordered_map:
Here is a code snippet:
unordered_map<int,int,boost::hash<int>, fast_pool_allocator<int>> theMap;
theMap[1] = 2;
Here is the compile error I get:
Error 3 error C2064...