Console Window Dissapears after hitting Enter
I made a very simple program here:
Code:
#include <iostream>
#include <string>
using namespace std;
// Prompt the user to enter a name, collect the name,
// and display a message to the user that contains
// the name.
int main()
{
string userName;
cout << "What is your name? :";
cin >> userName;
cout << "Hello " << userName << "!" << endl;
cin.get();
return 0;
}
After I put my name in, I push enter, then the window dissapears. Why? Thanks in advance. :p