On the top navigation bar, click “Project” ->; “Properties” – & gt; ‘Configure Properties’ –>; “Linker” –>; “System” – & gt; “Subsystems (there is a drop-down icon on the right side of the window)” –>; SUBSYSTEM:CONSOLE -> drop down box select ‘/SUBSYSTEM:CONSOLE’ -> Finally “confirm” –>; Click on the top right corner of “File” –>; “Save it all.”
Author Archives: Robins
The problem of flash back by pressing enter window when debugging or executing program in Visual Studio C
In the process of learning C with Visual Studio, we sometimes finished typing the code and found that the program could execute as well. But is it ever frustrating to press the enter key to execute the next command in the program and see the window flash back?Don’t worry. Just type the following simple code.
Just add the last line:
system(” pause “);
, don’t forget “; “Oh.
# include< stdio.h>
#include< stdlib.h>
main()
y>oplaceholder0;
*************;
*************;
system (” pause “); // Don’t forget the semicolon
}
Visual studio 2012, a complete collection of solutions to flash back windows after running
I believe you all have a kind of want to beat the rhythm of the person, every time to write the code, after the code is written, run the compiled code but the result of window flashback, below, I will introduce several solutions to Visual Studio 2012 run window flashback method. I hope I can help you solve this problem.
Method 1: Press Ctrl +F5 to run the program, and then run the program.
This method is only to solve the general flash back, rookie level novice if there is a flash back, might as well try this method, Xiaobian when just contact VS, is to use this method to solve.
//add system(“pause”) before Main’s returrn = 0;
This method can solve most of the flashback problem, of course, some more advanced, Xiaobian temporarily do not know whether this method has any effect, and so on later contact will be constantly updated.
Method 3: Use getchar() before return. This method can also solve the flashback problem, but you have to try it out slowly.
Method 4: Flashback will occur when an exception is encountered. To solve this problem, it is generally necessary to check the various plug-ins of VS itself, which may be caused by the expiration of plug-ins.
Method 5: you can try to set the debugging type to native or mixed only, this method is not always effective, the specific effective Xiaobian has not found the result, know the dear friends can also reply.
Inline void keep_window_open(char ch; cin> > ch;) , then add keep_Window_open() to the end of the mian function; This method is the most effective and the most commonly used, and the most effective method. (Recommended)
Method 7: Set breakpoint debugging method, press F9 to set breakpoint, press F10 to step debugging. This method is also very effective in finding errors.
The above is a summary of the solution to VS2012 flashback method, there are mistakes please point out, Xiaobian in this thank you. Of course, if there are other ways to reply, so that more latecomers can see, no longer bothered by the problem. Thanks for the flowers
Solution to the flash of visual studio 2017 running program

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

Flash back when compiling Visual Studio
@TocVisual Studio compile-time flashback
Select item ->; Property – & gt; Configure properties ->; The linker – & gt; System – & gt; Subsystem – & gt; Console (SUBSUSTERM: CONCOLE)
Visual studio 2015 compiler, console flash solution
Click Project — Project Properties;
C/C++ — Linker — System — Subsystem — Parallel — Go to the right drop down menu — Click console — OK;
Solve the problem of “Visual Studio debugging flash back”


[solution] visual studio will exit automatically after debugging the program
1. Set breakpoint 
Second, the system (” pause “)
(1) in the return 0; stem ("pause"); code>.
② Not using turn 0; stem ("pause"); code>;
note: in the ACM or leetcode upload code to join this sentence complains;
3. Select the console program when creating a new project
If an empty project is selected, there will be an automatic exit problem.
Change the project configuration properties
opens the project properties and changes the subsystem to the console. (essentially the same as solution 3)
Two lines of code to solve your vs flashback problem
At this point, add two lines of code to the end of the program to solve your flashback problem
Getchar ();
system(“pause”);
Ex. :
Ninety-nine multiplication tables
#include< stdio.h>
int main()
{
int i, j, m;
for (i = 1; i < = 9; i++)
{
for (j = 1; j < = i; j++)
{
m = i*j;
printf(“%d*%d=%d\t”, i, j, m);
}
printf(“\n”);
}
getchar();
system(“pause”);
return 0;
}
The solution of windows not flashing back when visual studio console program is running
Just as a note, please skip it
1. Add code to the program:
system("pause");
Can solve
Refer to the code of the teacher at station B:

2. For solutions that include multiple getChar (), it’s a palliative solution.
Visual Studio Editor
Visual Studio Editor
Use of the Visual Studio editor
Several reasons of program flashback crash
The
| memory td> | 1. Memory leak; 2. Load resource crash. |
| CPU | 1. The program is too complicated. td> tr> |
| software and hardware compatibility td> | 1. The runtime environment and hardware support do not match. For example, the Android system does not match, and the software running environment is missing. td> tr> |
| system memory recovery mechanism td> | 1. The system will recycle foreground processes when memory is tight. td> tr> |
| program internal mechanisms td> | 1. Some plug-ins or code actively performs software exit when it detects an abnormal running state at runtime. |
[Reprint please indicate the link of this article]
Solution of vs program flashback problem
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