Q:

C++ exit(0) no longer exits my program immedately after configuration changed from Debug to Release

Normally std::exit(int) will terminate your program right away, but for some reason, anywhere I put exit(0), instead of quitting immediately, on the console it asks "Press any key to continue..." first. 
Even if I throw exit(0) as the first line in main(), it still prompts me to press a key before exiting.
Only thing I did was change my project to compiling in Release Mode instead of Debug in Visual Studio,
normally in debug, I would see the project run as:
C:\User\<Username>\<File path>\<Project name>\Debug\<Project name>.exe
In release mode however, it runs as:
C:\Windows\system32\cmd.exe 
I don't know if that makes any difference..
Is there a way I can get it to terminate immediately upon calling a command such as exit() in Release mode?

A:

That's not the only thing that has changed. You're probably also running your program with "Ctrl+F5" instead of just "F5". Or that the debug checks enabled in debug mode used to detect a crash or something in your program which isn't being detected any more. Or a few other possible changes.
In any case, run your executable directly (e.g. from Windows explorer or a command prompt) and see that this "Press any key to continue..." doesn't appear there. Also you can run it using just "F5" (by default) although this alternative has other side effects.
My advice is not to worry about that "Press..." at the end. It's just VS extending you a helping hand, and won't happen when you ship/install/use the final app.

