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.

18th Jul 2016, 2:03 AM
Ryan Phillips
Ryan Phillips - avatar
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.
18th Jul 2016, 2:19 AM
Cohen Creber
Cohen Creber - avatar
+ 1
remember Sleep has a capital 'S'... I wandered for a week without knowing that
18th Jul 2016, 3:59 AM
Mukul Kumar
Mukul Kumar - avatar
0
linux has usleep() (correct me if im wrong) windows has Sleep() c++11 has this_thread::sleep_for()
18th Jul 2016, 4:10 AM
_Geometry dash_ _Roh_ (AKA NovaRate0315)
_Geometry dash_ _Roh_ (AKA NovaRate0315) - avatar