Solution to the problem of console flash in vs2017 runtime

F5 is the command to start debugging, Ctrl + F5 is the command to start debugging (not debugging). If you change the command to Ctrl + F5, you can display the output normally and “Press any key to continue… “One word, and the problem is settled.
However, some people will find that after pressing Ctrl + F5, the program will still flash, so you can try the following method to solve this problem:
① Right click on the name of your project on the right and select the property at the bottom.

② select the configuration properties in turn ->; Connector – & gt; system

We locate the SUBSYSTEM on the right, click the down arrow on the right and select the CONSOLE

Finally make sure to save, you can try again after the operation by pressing Ctrl + F5 to run ~
There’s actually another way to do it, in return 0; Enter system (” pause “) on the previous line;

Read More: