when you write a prog in c++ put this little snippet at the end

int x;
cin << x;
return 0;
}

That should keep it on the screen until you type in a number.