0

Delay between cout

Hello I want to know how to put a Delay between cout .Thanks!

24th Apr 2017, 8:54 AM
Alhasan Mohamed
Alhasan Mohamed - avatar
1 Answer
+ 5
#include <iostream> #include <ctime> using namespace std; void delay(int milliseconds){ clock_t goal = milliseconds + clock(); while(goal>clock()); } int main(){ while(1){ cout << "Problem?" << endl; delay(1000); }; //That is self delay function }
24th Apr 2017, 9:00 AM
Yanothai Chaitawat
Yanothai Chaitawat - avatar