You need to either run your program from the command prompt, or put some form of pause at the end of your program.
using namespace std;
// This is my program
cout << "Hello world!\n\n\n";
// This keeps the console window open on Windows.
cout << "Press ENTER to quit." << flush;
cin.ignore( numeric_limits <streamsize> ::max(), '\n' );
Personally, I recommend you get used to using the command prompt when working with console programs. On Windows, you can get to the command prompt by clicking Start, Run..., and typing "cmd". Then use the "cd" command to change to the directory where you compiled your program. Then type the name of your program and see it go.