When writing C/C ++ programs in VS, the result box will always flash away, and you can’t see the results of the program. This is really annoying, so here are three ways to solve it
Method one:
In the return 0; Before the statement, add a getchar(); In this case, getchar will wait for input, and the result box will display the result of the program.
As shown in the figure below:
Method 2:
Add the statement system(“pause”) at the end of the program; , plus the header file #include< stdlib.h> “, which will display the results after running them and prompt you to press any key to continue.
As shown in the figure below
Method 3:
To modify the project configuration, right-click on the project, select Properties from the right-click menu, and then select “Configuration Properties –>” from the list to the left of the pop-up dialog. The linker – & gt; System “, and then in the list on the right, in the first “subsystem” value, select “Console (/SUBSUSTEM:CONSOLE)”
As shown in the figure below:
From:
https://blog.csdn.net/rannianzhixia/article/details/66968219?locationNum=6& fps=1
Method one:
In the return 0; Before the statement, add a getchar(); In this case, getchar will wait for input, and the result box will display the result of the program.
As shown in the figure below:
Method 2:
Add the statement system(“pause”) at the end of the program; , plus the header file #include< stdlib.h> “, which will display the results after running them and prompt you to press any key to continue.
As shown in the figure below
Method 3:
To modify the project configuration, right-click on the project, select Properties from the right-click menu, and then select “Configuration Properties –>” from the list to the left of the pop-up dialog. The linker – & gt; System “, and then in the list on the right, in the first “subsystem” value, select “Console (/SUBSUSTEM:CONSOLE)”
As shown in the figure below:
From:
https://blog.csdn.net/rannianzhixia/article/details/66968219?locationNum=6& fps=1
Read More:
- Three methods of how to remove the flashback of running result box in VS
- Solution to flash back of visual studio 2017 running program
- The problem of running result window flash of vs2015
- Solution for flash back of vs2015 running interface
- The perfect solution of VS2010 console program running in a flash
- C language program running results flash back how to do
- Flash back of running program in Visual Studio 2017
- Solution to the flash of visual studio 2017 running program
- 2、 Solutions to the problem of flash back in vs2017
- Flash back after vs compiler running, processing method
- Visual studio 2012, a complete collection of solutions to flash back windows after running
- Why does the result screen flash when visual studio runs the program?
- The reasons and common solutions of vs flash back on the road of C + + Learning (with reasons attached)
- The solution of flashing back after the end of console program running
- Solve the problem of flash back in VS2010
- Solution to the problem of console output window’s CMD flashing back when vs2015 writes C + + program
- Solution to the flash of running result of dev C / C + +
- Summary of solutions to open flash back problem after Python packaging
- Some solutions to the problem of windows flashback after vs running
- Make DOS window wait and not flash back in VS