Hello,
Reciently I started messing with '\b'. If you look at some of my other posts one of them is about making a text-based progress bar the refreshes and stays in the same spot. Pretty cool to me. Anyways, I am making a bit bigger project this time, and am looking to know if '\b' and move the cursor up a line... The answer I found was no, how would you do this? Here's a small program to prove it won't.
1 2 3 4 5 6 7 8 9 10
// can '\b' negate '\n'?
#include <iostream>
usingnamespace std;
int main()
{
cout << "\n\n\bHi\t\bhi";
return 0;
}
\b only moves the caret back one space if possible, but you already know that. I do not think that there is a "reverse newline" character that you can print however, so you would probably need to use a console function that is likely OS-dependent.