+ 1
C++ sleeping
Could someone explain to me how to use sleep(), Sleep(), usleep() etc and what library (ies) to include? I can't find good answers anywhere
2 Answers
+ 7
In C++, we don't use sleep() instead we use delay(), but it will not work in sololearn...
If you have other compiler like dosbox turbo compiler, then try this....
#include <iostream>
#include <dos.h> //for the delay
int main{
delay(1000); //equals to 1 second or 1000 milliseconds
return 0;
}
+ 2
sorry