1. Test procedure:
#include "StdAfx.h"
#include <iostream>
using namespace std;
int main()
{
int radius;
const double pi(3.14926);
cout<<"Please input R:";
cin>>radius;
cout<<"R is:"<<radius<<endl;
cout<<"S is:"<<pi*radius*radius<<endl;
return 0;
}
2. Solutions
(1) If the operation is compile (F5), flash, you can run the program first (Ctrl+F5), will not flash.
(2) If the above methods do not work
1. Right-click Current Project – Properties
2. Select Configuration Properties – Linker – System
. Change the SUBSYSTEM configuration in System Options and select the first/CONSOLE from the drop-down menu.
Then select “Start (Not Debug) “, that is, press Ctrl +F5;
(3) or program manipulation
In a C++ file, add: system(“pause”) before the last line (return) of the program;
In the case of a C file, the program header adds a header: #include”stdlib.h”; Then add: system(“pause”) at the end of the program (before return); .
(4) Set the breakpoint, and then debug (F5), also can.
Read More:
- VS2010 debugging window flash solution
- The problem of flash back by pressing enter window when debugging or executing program in Visual Studio C
- The problem of running result window flash of vs2015
- The problem of black box flash away in vs2019 debugging
- Solution to the problem of console flash in vs2017 runtime
- Solution to the problem of console output window’s CMD flashing back when vs2015 writes C + + program
- Solution to the flash of visual studio console program output window
- The problem of window flash after C + + program is compiled and run
- Make DOS window wait and not flash back in VS
- The problem of C + + compile result window flash by
- How to solve the problem that the console window disappears in a flash after visual studio 2017 runs
- The perfect solution of VS2010 console program running in a flash
- Solve the problem of flash back in VS2010
- Solve the problem of vscode window console “flash”
- Solve the problem of “Visual Studio debugging flash back”
- Solution for flash back of vs2015 running interface
- 2、 Solutions to the problem of flash back in vs2017
- Solution of vs program flashback problem
- The solution to the black window flash of running program on Visual Studio
- Configuring OpenGL in Chinese version of VS2010 and problem solving