Can anyone give me any code to pause a DOS application for a few seconds, and then end the programming;
Thanks in advance
CloudNine
Can anyone give me any code to pause a DOS application for a few seconds, and then end the programming;
Thanks in advance
CloudNine
Instead of the
use theCode:return 0; }
as soon as a user presses any key and hits enter, the program will terminate.Code:system("PAUSE"); return 0; }
He said pause for a few seconds!
include windows.h and use
Sleep(milliseconds);
for example
Sleep(3000);
would pause for 3 seconds
For that you might have to include the conio header anyhow, or the time.h file
its either sleep(a value);
or _sleep(a value);
depending on what compiler u use
if u got borland u can use
delay(a value);
i think the header for the sleeps i <stdlib.h>
and delay i think <dos.h>