Navigation
Main
Forums
Chat
Contact Me

C
About C
Tutorials
FAQ
Code Archive
Downloads
Challanges
Links To C Sites

C++
About C++
Tutorials
FAQ
Code Archive
Downloads
Challanges
Links To C++ Sites

HTML
About HTML
Tutorials
FAQ
Code Archive
Downloads
Challanges
Links To HTML Sites

Java
About Java
Tutorials
FAQs
Code Archive
Downloads
Challanges
Links To Java Sites

mIRC
About mIRC
Tutorials
FAQs
Code Archive
Downloads
Challanges
Links To mIRC Sites

C FAQ


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 (" ").