Ok heres what happens.
VC runs the program in whats called a console window.
That will automatically terminate(go away/die) whe the programs done running.
So what you do is flush the buffer by uing the endl specifier, and then have a loop where you wait for keyboard input.
Flush the buffer means:
cout maintains a storage of characters called a buffer.
Your cout << statements just add to this bunch of data. :D
When it feels like it, it writes these to the screen.
Pushing all of this data to the output device(aka monitor in this case) is called flushing.
So you flush the buffer, then run a loop like so
while(!kbhit()){}
Which means, while the keyboard is NOT hit, loop.
You use conio.h for kbhit().
Have fun !!!
Bugle4d