Flashback problem of output window of visual studio 2017 console program

When you first come into contact with Visual Studio, most people will write a Hello World program to try. Some people will find that the output window will flash past after execution, and there is no “Press any key to continue”. This has happened in Visual Studio 2008, 2010, 2012, 2015, and now 2017, and some people might do it one of two ways:
Add system(“pause”) or getchar() at the end of the program code. In fact, this is a command under DOS.
Example:

#include "stdio.h"
int main()
{
    printf("hello world\n");
    system("pause");
}

The problem is that when you Press F5, the correct one should be Ctrl+F5, and the window will display Press any key to continue… That’s it. You can also see the results of the program run.
This is because F5 is in Debugging mode, where the window does not remain open once the application finishes running. If CTRL +F5 is in Start Without Debugging mode, you’ll be able to see the results.
 
If you press Ctrl+F5 and it still flashes, then use the following Settings:
In the top navigation bar, click “Project” –>; “Properties” – & gt;” Configure property “–>” The linker – & gt; “” System – & gt; “” Subsystems (there is a drop-down icon to the right of the window) “–>; SUBSYSTEM:CONSOLE The drop down box selects’ /SUBSYSTEM:CONSOLE ‘– gt; Finally “confirm” –>; Click on the top right corner “file “–>; “Save it all.”
 
// Finally, press Ctrl + F5 to avoid the flashback problem.
    


Read More: