0
how to put delay in cplus plus program code
delay in c pp
2 ответов
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;
}
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