Is it possible to change text printed with "cout"? I would like to make it show the current percentage of something without having to have a new line for each percentage. Is this possible?
This works for me:
std::cout << "1111";
std::cout << "\r";
std::cout << "2222";
\r
is a carriage return symbol. Puts the "cursor" back to the beginning of the line.
Alternatively you can use \b
character. This is backspace. When printed it goes one character back.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With