Add an input statement to the end of the editor: cin.get(); In this way, the user will be required to input characters before the end of the program (or the Enter key can close the window), and the console will remain in existence before the input. The specific code is shown in the figure below
Add system(“pause”) at the end of the editor; After adding this sentence, the console will display “Please press any key to continue” after displaying the result of running. The specific code is 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 on the left of the pop-up dialog box –>; ‘Linker’ –>; “System”, and then in the list on the right, in the first “subsystem” value, select “Console (/SUBSUSTEM:CONSOLE)” as shown in the figure below
Add system(“pause”) at the end of the editor; After adding this sentence, the console will display “Please press any key to continue” after displaying the result of running. The specific code is 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 on the left of the pop-up dialog box –>; ‘Linker’ –>; “System”, and then in the list on the right, in the first “subsystem” value, select “Console (/SUBSUSTEM:CONSOLE)” as shown in the figure below
Read More:
- Solution to flash back of visual studio 2017 running program
- The solution to the black window flash of running program on Visual Studio
- Flash back of running program in Visual Studio 2017
- Solution to the flash of visual studio console program output window
- Why does the result screen flash when visual studio runs the program?
- The solution of windows not flashing back when visual studio console program is running
- Visual studio 2017, OpenGL program running prompt glut32.dll missing solution
- Visual studio 2012, a complete collection of solutions to flash back windows after running
- Visual studio 2015 compiler, console flash solution
- The perfect solution of VS2010 console program running in a flash
- Three solutions to flash back of program running result box under vs
- The problem of flash back by pressing enter window when debugging or executing program in Visual Studio C
- How to solve the problem that the console window disappears in a flash after visual studio 2017 runs
- Flash back when compiling Visual Studio
- Solution of command line window flashback when visual studio runs C + + program
- Flashback problem of output window of visual studio 2017 console program
- [solution] visual studio will exit automatically after debugging the program
- Solution to the flashback of visual studio output window
- Solve the problem of “Visual Studio debugging flash back”
- Solve the problem of flash back in Visual Studio 2010