0
is there a "wait" function?
I want to have a delay between two cout outputs. I was told to Google it, but everything it says dosnt seem to work in this app.
3 ответов
+ 1
No need to create a new topic, just reply to the old one and we'll help you out. I wrote this on your last topic, and it should work fine if you are coding on Windows OS.
#include <windows.h>
Sleep(1000);
The parameter that Sleep() takes is the time you want to wait in milliseconds, where 1000ms = 1s.
Obviously will likely only function on systems running Windows OS, hence the header.
+ 1
remember Sleep has a capital 'S'...
I wandered for a week without knowing that
0
linux has usleep()
(correct me if im wrong)
windows has Sleep()
c++11 has this_thread::sleep_for()