Ask a question.
How do I stop my program from ending when it finishes, or how do I wait for a key to be pressed to continue?
How do I clear the screen?
How do I stop my program from ending when it finishes, or how do I wait for a key to be pressed to continue?
It partly depends on your compiler. system("PAUSE") will wait for a key to be pressed to continue, however it gives its own annoying message. I suggest trying either getch(), getche(), or getchar() and including conio.h.
How do I clear the screen?
To clear the screen use system("cls"), assuming your program runs in DOS, system() will proform the command in the (" ").