Possible Duplicate:
How to stop C++ console application from exiting immediately?
I am running a simple program, written in Dev C++ 4.9.9.2 IDE in Windows 7:
// my second program in C++
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello World! ";
cout << "I'm a C++ program";
system("pause");
return 0;
}
This compiles successfully, but when I run it, the terminal screen comes for a second and then vanishes. How can I keep the output screen of the program visible?