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:
- Solution to the flash of visual studio console program output window
- Visual studio console program output window flashed by
- Solution to the flashback of visual studio output window
- Solve the problem of visual studio console flashback
- Solution of command line window flashback when visual studio runs C + + program
- How to solve the problem that the console window disappears in a flash after visual studio 2017 runs
- Solution to the problem of console output window’s CMD flashing back when vs2015 writes C + + program
- The problem of flash back by pressing enter window when debugging or executing program in Visual Studio C
- The solution of windows not flashing back when visual studio console program is running
- The solution to the black window flash of running program on Visual Studio
- There are three ways to deal with the problem of vs (Visual Studio) 2017 flashback. I feel that none of them is the fundamental solution.
- Causes and solutions of black frame flashback after debugging visual studio 2017
- Solution of vs program flashback problem
- Visual studio 2015 compiler, console flash solution
- Flash back of running program in Visual Studio 2017
- Why does the result screen flash when visual studio runs the program?
- Solution to flash back of visual studio 2017 running program
- [solution] visual studio will exit automatically after debugging the program
- Solution to the flash of visual studio 2017 running program
- C language — to solve the problem of program flashback when programming (in VS)