[C / C ] Sleep function in C / C – Function Sleep in C/C
Ham sleep(int n) used to generate 1 period “Sleeping” program (n seconds). To use it we declare library unistd.h.
#include <unistd.h>
#include <iostream>
int main()
{
std::cout << "Sleeping for 10 seconds ..." << std::endl;
sleep(10);
return 0;
}



I salute you sir! he asked the star for f e re unistd.h library declaration not ship sir, visual error can not source files :'(
thank you sir
Ah sorry not to do on the visual. He works on the dev-c must.
library declaration “windows.h” light!
[Error] ‘sleep’ was not declared in this scope
despite declaring library, but e still crash on
Other e s a help with sir
You try windows.h see stars.
the letter 's’ is capitalized nhé
Sleep(int milisecond);
using C ++ online is okay.