I am making a command-line c++ application and I want text to be on a sort of timer because there is a lot of text. I already know how to make it so they have to press enter, but I want it to be automatic. What would be the simplest way to do this.
Example Output:
Welcome to the Calculator Game!
(1 second later) Do you want to play(Yes or No)?
The easiest thing is just to use `sleep(milliseconds)’. Most operating systems have varous ways of doing timers as well.
Even better if you are using C++11, use something like this:
If you’re not using C++11, then try the following:
Docs here: http://en.cppreference.com/w/cpp/thread/sleep_for