The console application does not print "Press any key to continue."

I have third-party SDK code samples written in C ++ (console applications). When I start any of them from Visual Studio 2010 ("Start without debugging"), it does not print "Press any key to continue." in the end, the console window is simply closed.

How did they manage to achieve this behavior? More importantly: how can I get the standard "Press any key to continue ..." at the end? Of course, without changing the program code ...

+3
source share
3 answers

Change the subsystem to the Console in the link settings

+3
source

Ctrl + F5, F5.

+6

Try

system(PAUSE);

It should print what you are looking for

+3
source

All Articles