Hey everyone,
been working hard to get past the newbie stage ! However I have yet one more totally newbie question.

when I use cin.get(); at the end of a program or the end of a function to keep the prompt window open.....

IT DOESN'T EVER WORK ~!!

I see it in everyone elses code used the same way...... I think.

here's an example. when I run even the ol' simple " hello world " program with cin.get(); at the end, it won't stay open. The program runs, and the window closes in about 0.343 seconds.

here's a quick example code:

Code:
#include <iostream>

using namespace std;

int main()
{
    cout << "Hello world!" << endl;
    return 0;

    cin.get();
}

Am I using it correctly ?

if so why doesn't this work for any of my programs ?

thanks