// should use cin.ignore but you can use this
// it displays: "Press any key to continue..."
// and when you press any key, it continues...
or as veron was saying
// Before using this make sure you have included: #include <windows.h>
// the amount you put is in miliseconds, 1000 = 1 second
// this will wait the amount of time you put into before moving on.
put that in, and you will press enter before the window closes..
atm it is running correctly but it doesent know you want it to wait till you want to end it, so you have to add that.
Slap that on the end of the code. This will do the following:
ignore all the available input from the cin (console) input buffer, then grabs a null terminated character (basically waits until you hit enter).