0

how to put delay in cplus plus program code

delay in c pp

19th Mar 2019, 12:43 PM
SAIYAN HAMZA
SAIYAN HAMZA - avatar
2 Respuestas
0
Use sleep function -------------------- #include <iostream> #include <unistd.h> using namespace std; int main () { cout << "Waiting 5 secs\n"; sleep(5); cout << "WAKE UP!!!\n"; return 0; }
19th Mar 2019, 3:16 PM
Prokopios Poulimenos
Prokopios Poulimenos - avatar
0
yes i did it but when i put two sleeps in program then the program don't work correctly and sometimes sleeps for more time at unexpected places in the code
19th Mar 2019, 3:17 PM
SAIYAN HAMZA
SAIYAN HAMZA - avatar