is there a "wait" function? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

is there a "wait" function?

is there a way to make the program wait a certain amount of time between 2 cout outputs?

18th Jul 2016, 1:03 AM
Ryan Phillips
Ryan Phillips - avatar
4 Answers
+ 1
No, it wouldn't. Google can help you with a wait function for your Android, but when it comes around to you programming on a PC, the method I shown should work.
18th Jul 2016, 2:40 AM
Cohen Creber
Cohen Creber - avatar
18th Jul 2016, 1:40 AM
Stefan
Stefan - avatar
0
#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:06 AM
Cohen Creber
Cohen Creber - avatar
0
by windows os, I assume you mean it will not work on this app, which I'm running on my android?
18th Jul 2016, 2:32 AM
Ryan Phillips
Ryan Phillips - avatar