Then when the program is run from the console, the process will go into an infinite loop instead of exiting. If you try double clicking the program in Explorer, it silently dies, presumably because it threw an exception. I tried on Windows XP, and the program opens when double clicked but still goes into an infinite loop at exit.
With the following program:
On Windows 7 64-bit, if you compile the program as a Windows program instead of a console program using
Then when the program is run from the console, the process will go into an infinite loop instead of exiting. If you try double clicking the program in Explorer, it silently dies, presumably because it threw an exception. I tried on Windows XP, and the program opens when double clicked but still goes into an infinite loop at exit.