+ 1

Is there ways for my program, that can force my program wait maybe 5 sec and only then I can enter with cin>>"" (C++)

27th Jun 2020, 3:53 PM
DeepInsomnia
DeepInsomnia - avatar
2 odpowiedzi
+ 1
#include <iostream> #include <thread> #include <chrono> using namespace std; int main() { cout << "program paused for 5 seconds" << endl; this_thread::sleep_for (chrono::seconds(5)); cout << "Timer finished"; return 0; }
27th Jun 2020, 7:00 PM
rodwynnejones
rodwynnejones - avatar
+ 3
You can use sleep() function for that Learn about it here👇 https://www.geeksforgeeks.org/timer-c-using-system-calls/
27th Jun 2020, 3:58 PM
Arsenic
Arsenic - avatar