Help to slow down the output

I need to slow down the output in my app

Can anyone please help?


1
2
3
  

I'm not sure what output would you like to to slow down. Could you be more specific?
I guess it is about printing output in a loop in that case you can use function which will wait some time after or before every cout.
For example you can make countdwn timer from 10 to 0 printing number every second:

1
2
3
4
5
6
7
8
9
10
11
12
#include <iostream>
#include <thread>
#include <chrono>

int main() {
	for (int i = 10; i >= 0; --i) {
		std::cout << i << "\n";
		std::this_thread::sleep_for(std::chrono::seconds(1));
	}

	return 0;
}

I hope it helps but without more data I'm afraid can't help you.
Hi Tikeri, yes you were correct, its to slowdown the output of txt within a loop :)

Thanks alot, I will try the code tomorrow and report back, thanks again :)
Last edited on
Thanks Tikeri, I managed to get it working the way I wanted with a small bit of modification, thanks to you :)
Topic archived. No new replies allowed.