Tuesday, August 9, 2011

Help pausing a program in dev c++?

There's a few different ways you can do that. The best way to do it is to put a sleep command at the end of the program. The syntax is sleep(int), where int is the number of seconds you want the program to pause. If you want it to pause for an indefinite period of time, you could alternately just use a blank cin >> line that would freeze the program until a key is pressed. But, if it were me, I'd just use the sleep command.

No comments:

Post a Comment