Problem solving – vs debugging window flash solution

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: