I'm in some grave need of help.
I need a way to make the program pause without using the system("pause") as to make it compatible with any OS etc, and in addition I want a way to do it that makes it possible to alter the messeage given out on the screen, but does the same as the program behind the "press any button to continiue..." messeage.
You need to keep an eye on what you do with streams, check the documentation to see what gets left in the stream after function calls. for example:
1 2
int i=0;
cin >> i;
The user will enter a series of numbers followed by return, so the stream will have somthing like 1234\n put into it. 'cin >> i' only takes out the numbers leaving the \n in the stream. Then later on code such as getchar() is called, it looks at the stream fins the\n and returns straight away.