Right click on the project—>Properties—>Configuration Properties—>Connector—>System—>Subsystem (on the right side of the window)—>Drop-down box to select the console (/SUBSYSTEM:CONSOLE)
Note
1. Ctrl+F5 compiles the program . In this mode, you can see the running results.
2. F5 is Debugging mode. In this mode, when the program finishes running, the window will not remain open.