c++

Different versions of C++ libraries

After compiling a simple C++ project using Visual Studio 2008 on vista, everything runs fine on the original vista machine and other vista computers. However, moving it over to an XP box results in an error message: "The application failed to start because the application configuration is incorrect". What do I have to do so my compiled ...

Automated integration testing a C++ app with a database

I am introducing automated integration testing to a mature application that until now has only been manually tested. The app is Windows based and talks to a MySQL database. What is the best way (including details of any tools recommended) to keep tests independent of each other in terms of the database transactions that will occur? (...

How can I tell if a Windows application (command line or GUI) is running on locked workstation or while user is logged out

I have several applications that are part of a suite of tools that various developers at our studio use. these applications are mainly command line apps that open a DOS cmd shell. These apps in turn start up a GUI application that tracks output and status (via sockets) of these command line apps. The command line apps can be started w...

C++ unit testing framework

I use the Boost Test framework for my C++ code but there are two problems with it that are probably common to all C++ test frameworks: There is no way to create automatic test stubs (by extracting public functions from selected classes for example). You cannot run a single test - you have to run the entire 'suite' of tests (unless you ...

How do I use my own compiler with Nant?

Nant seems very compiler-centric - which is guess is because it's considered a .NET development system. But I know it can be done! I've seen it. The platform we're building on has its own compiler and doesn't use 'cl.exe' for c++. We're building a C++ app on a different platform and would like to override with our own compiler. Can anyo...

Attribute & Reflection libraries for C++?

Most mature C++ projects seem to have an own reflection and attribute system, i.e for defining attributes which can be accessed by string and are automatically serializable. At least many C++ projects I participated in seemed to reinvent the wheel. Do you know any good open source libraries for C++ which support reflection and attribute...

c++ project ideas

Are there any ideas for or links to c++ project ideas that would be good for somebody with limited c++ experience and looking to shake off the rust? ...

In Python, how do you take tokenized input such as with the C++?

In C++, I can have take input like this: cin >> a >> b >> c; And a can be int, b can be float, and c can be whatever... How do I do the same in python? input() and raw_input(), the way I'm using them, don't seem to be giving me the desired results. ...

C++ Derived Class problems

I am making a game in C++ and am having problems with my derived class. I have a base class called GameScreen which has a vitrual void draw() function with no statements. I also have a derived class called MenuScreen which also has a virtual void draw() function and a derived class from MenuScreen called TestMenu which also has a void ...

Should I use an exception specifier in C++?

In C++, you can specify that a function may or may not throw an exception by using an exception specifier. For example: void foo() throw(); // guaranteed not to throw an exception void bar() throw(int); // may throw an exception of type int void baz() throw(...); // may throw an exception of some unspecified type I'm doubtful about ac...

What Does {0} Mean in C?

When {0} is used to initialize an object in C/C++, what does it mean? I can't find any references to {0} anywhere, and because of the curly braces Google searches are not helpful. Example code: SHELLEXECUTEINFO sexi = {0}; sexi.cbSize = sizeof(SHELLEXECUTEINFO); sexi.hwnd = NULL; sexi.fMask = SEE_MASK_NOCLOSEPROCESS; sexi.lpFile = lpFi...

Produce conditional compile time error in Java

I do not mean the compile errors because I made a syntax mistake or whatever. In C++ we can create compile time errors based on conditions as in the following example: template<int> struct CompileTimeError; template<> struct CompileTimeError<true> {}; #define STATIC_CHECK(expr, msg) { CompileTimeError<((expr) != 0)> ERROR_##msg; (void)...

Best C++ IDE or Editor for Windows

What is the best C++ IDE or editor for using on Windows? I use Notepad++, but am missing IntelliSense from Visual Studio. ...

Help with algorithm for merging vectors

I need a very fast algorithm for the following task. I have already implemented several algorithms that complete it, but they're all too slow for the performance I need. It should be fast enough that the algorithm can be run at least 100,000 times a second on a modern CPU. It will be implemented in C++. I am working with spans/ranges, a...

Comparing std::tr1::function<> objects

I've been trying to implement a C#-like event system in C++ with the tr1 function templates used to store a function that handles the event. I created a vector so that multiple listeners can be attached to this event, i.e.: vector< function<void (int)> > listenerList; I'd like to be able to remove a handler from the list to stop a ...

AssignProcessToJobObject fails with "Access Denied" error when running under the debugger

You do AssignProcessToJobObject and it fails with "access denied" but only when you are running in the debugger. Why is this? ...

Help on Porting a SIP library to PSP

I'm currently trying to port a SIP stack library (pjSIP) to the PSP Console (using the PSPSDK toolchain), but I'm having too much trouble with the makefiles (making the proper changes and solving linking issues). Does anyone know a good text, book or something to get some insight on porting libraries? The only documentation this proje...

C++ Editor, Compiler, Debugger on Windows ( Lighter than Visual Studio)

What would be a good alternative to Visual Studio ? Free or non-free, but a free program definitely makes a better choice. So what do you guys use ? If anything like that exist... ...

Is there a way to compile C++ code to Microsoft's CIL "bytecode"?

i.e., a web browser client would be written in C++ !!! ...

Game Programming Library C++

Which is the best available, free, easy-to-learn game programming library for C++? ...