wait - How use `cin` to pause the program for 10 seconds in C++ -


exacly stated in subject: how use cin wait(pause program) 10 seconds in c++. make act simiral java's thread.wait.

edit: asking cin

that not way cin works, has no notion of timeouts.

what want is, mentioned java, pause thread. can done in several ways...

  • c++11: std::this_thread::sleep_for(std::chrono::seconds(10));
  • posix (linux et al.): sleep(10);
  • windows: sleep(10000); (in milliseconds)

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -