As you would expect in the following program, the control is out of control in a flash after running, so we are now going to solve this problem in our code in the following ways
1. The getchar ()
This statement is to wait for user input, implementation program pause
2.system(“pause”)
This statement causes the system command program to pause, so adding this statement before return 0 causes the program to pause
3. The while (true)
This is easy to understand, but it may not be appropriate for some applications
4. Run the program using Ctrl+F5
In VS, because we built the project originally, it was an empty project
> Properties of the project> “Configuration properties”>> “linker”> Subsystem The item “subsystem” in “System” is changed to “Console”
After doing this, press Ctrl+F5 again and the program will end up in the console screen
Read More:
- C language — to solve the problem of program flashback when programming (in VS)
- 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.
- Flashback problem of output window of visual studio 2017 console program
- Some solutions to the problem of windows flashback after vs running
- Solution to the problem of console output window’s CMD flashing back when vs2015 writes C + + program
- Two lines of code to solve your vs flashback problem
- Solution of command line window flashback when visual studio runs C + + program
- The perfect solution of VS2010 console program running in a flash
- Vs series console flashback solution
- To solve the problem of flashback of calling class function of glutsolidcube() in Win32 program
- Vs output flashback
- Three methods of how to remove the flashback of running result box in VS
- Problem solving – vs debugging window flash solution
- Three solutions to command line flashback in VS
- In vs programming, the code of Ctrl + F5 is flashback
- Solution to the problem of console flash in vs2017 runtime
- Solution to the flashback of visual studio output window
- Vs debug window flashback
- Several reasons of program flashback crash
- How to solve the problem that the output results of C + + program written in VS2010 flash by