This is a probably an embarasing question as no doubt the answer is blindingly obvious.
I\'ve used Visual Studio for years, but this is the first time I\'ve done any
Here is a way for C/C++:
#include
#ifdef _WIN32
#define WINPAUSE system("pause")
#endif
Put this at the top of your program, and IF it is on a Windows system (#ifdef _WIN32
), then it will create a macro called WINPAUSE
. Whenever you want your program to pause, call WINPAUSE;
and it will pause the program, using the DOS command. For other systems like Unix/Linux, the console should not quit on program exit anyway.