0
how do you use C++ sleep time function the same way python uses ( time.sleep(2) )...plz help!!!
C++ sleep time function
2 Antworten
+ 8
#include <iostream>
#include <windows.h>
int main()
{
std::cout << "Hello ";
Sleep(1000);
std::cout << "World.";
return 0;
}
// pauses output after "Hello " for 1000ms
+ 3
sleep(unsigned int)
the (unsigned int ) is an integer in milisecond.
sleep(1000) : waits for 1 second
you should mention #include<time.h> too