Tried using Visual C++ Express edition but it seems more trouble to use (e.g., there's no automatic prompt to prevent the DOS box from disappearing).
The easiest way to stop console program before exiting (and closing console) is to put a breakpoint in the end of main() (provided you did not use exit() indiscriminately). In Visual Studio, you also have an option of running the program (as opposed to debugging), using "exclamation mark" button. And, as another poster suggested, you can run your program from the command line directly.
Only the first solution will enable you to debug the program though...
Is there a way to portably build portable C++ code?
GNU Make can do it in theory, but it lacks (direct) support for configurations (easy switch between debug and release build), lacks portable generation of dependencies, does not handle interdependencies between projects well (e.g. EXE that depends on DLLs), has difficulties when multiple compilers should build the same source tree (so target dirs for binaries should be separated), and is generally pain in the neck.
Is there a build system that does not require you to change project files (or makefiles or whatever you call them...) when you change the platform or compiler or configuration?
Airplane designers say that airplane should be beautiful in order to fly well. The same holds for source code: it must be beautiful to run well.
Of course, "beauty" does not only mean "nice formatting".
This is the consequence of programming still being largely an art, instead of strictly defined engineering discipline.
Tried using Visual C++ Express edition but it seems more trouble to use (e.g., there's no automatic prompt to prevent the DOS box from disappearing).
The easiest way to stop console program before exiting (and closing console) is to put a breakpoint in the end of main() (provided you did not use exit() indiscriminately). In Visual Studio, you also have an option of running the program (as opposed to debugging), using "exclamation mark" button. And, as another poster suggested, you can run your program from the command line directly.
Only the first solution will enable you to debug the program though...
Is there a way to portably build portable C++ code?
GNU Make can do it in theory, but it lacks (direct) support for configurations (easy switch between debug and release build), lacks portable generation of dependencies, does not handle interdependencies between projects well (e.g. EXE that depends on DLLs), has difficulties when multiple compilers should build the same source tree (so target dirs for binaries should be separated), and is generally pain in the neck.
Is there a build system that does not require you to change project files (or makefiles or whatever you call them...) when you change the platform or compiler or configuration?
What happens when you call an overridden virtual method from a virtual base class's constructor?
A base class method gets called. This is actually defined by C++ standard and all compilers should handle it this way.
Airplane designers say that airplane should be beautiful in order to fly well. The same holds for source code: it must be beautiful to run well. Of course, "beauty" does not only mean "nice formatting". This is the consequence of programming still being largely an art, instead of strictly defined engineering discipline.