The problem of window flash after C + + program is compiled and run

Unicorns are hiring Python engineers in 2019. > >

Problem: When you first learn C++ to write Win32 Console Application using a different compiler, the resulting window may flash and disappear.
Some compilers are very good, and there are similar solutions in the example program. For example, in DevC ++, when creating a new non-empty C++ class, return 0; Before this: system(“PAUSE”); In Visual Studio there is no flash if you follow the steps, but when we press the shortcut key F5, the result will still flash. We can do this in return 0; STD ::cin.ignore(STD ::cin.rdbuf()->; in_avail()+1); That way it will show up, not just go over it. If you just want to see the result, there’s another way, and that’s in return 0; I’m going to say while(1);
Thank you @IM Xinye for reminding me. My posture has risen. When compiling, if you press F5 directly for debugging, there will be a flash of the situation. If Ctrl +F5 is not debugging, then there will be no flash.

Reproduced in: https://my.oschina.net/u/734295/blog/160510

Read More: