Visual studio console program output window flashed by

Write at the front:
This blog post introduces a little annoying problem solving that isn’t a bug. Programming with Visual Studio often uses the console output window, but there is always a situation where the window flashes past and it is difficult to see the output of the program. Here, I write a blog post to record it, so as not to forget or make similar mistakes in the same type of problem.
Solution:
1. In the last line of the program, return 0, add system(” pause “) or getchar(); It solves some problems, which I often do when I do some OJ tests in order to test in my IDE;
2. Don’t Press F5 to run the program, Ctrl + F5 instead, a window will be displayed like this: “Press any key tocontinue…” The words. The reason is that F5 is in Debugging mode, while CTRL +F5 is in Start Without Debugging mode. I found this on the Internet. Can really solve the problem, but their lack of practical theoretical knowledge to support, so in the future to read a lot of attention to the process.

Read More: