How do I slow down output made through cout?
When output strings are too long to fit inside the Terminal or Command Prompt window, I want to make the text scroll slow enough to read.
Thanks in advance.
Printable View
How do I slow down output made through cout?
When output strings are too long to fit inside the Terminal or Command Prompt window, I want to make the text scroll slow enough to read.
Thanks in advance.
You can do it Zelda style just by outputting a character at a time, and using a timer to wait in between characters. This method requires that you put everything into strings first.
The easiest way is to just Sleep between each output.
I think it is also common to prompt the user to press Return to get the next "page" of output.
There is a standard way to do what I was saying, posted here. But it sounds like the other thing is better, anyway. For a good console size, I don't think you can go wrong with 80 characters x 25 lines so just work around that.
Not standard. It is configurable. The only way to know is to use Windows API, which you want to avoid in the first place.
It is. But there is no portable way of doing without wasting lots of cpu resources. You could just limit yourself to Windows and Linux.
Why? WHY??? This is the very exact thing we suggest people avoid!
Delay loops are frowned upon, so why would you suggest it? I don't understand.
He asked for a standard way. I couldn't do anything about how much standard code sucks in that situation. Make me a martyr for it.
What I'd really like to know is - why the hell don't we have a good standard way of doing this?
Probably not useful enough. The committee have limited resources and has to prioritize. That's my guess, anyway.