if we just call the c/c++ standare output interface, such as printf, in fact we ouput new text at the back of already printed text, but sometimes, we have to modify the printed text in current line. in this case, we can use the format simbol such as '\b' and '\r'
the final output would be 12abc, and:
the final ouput would be abc, that 's all.
'\b' will move the cursor back to one backspace, and '\r' will move the cursor to the beginning position of current line. one example is this:
printf("123");
printf("\b");
printf("abc");
the final output would be 12abc, and:
printf("123");
printf("\r");
printf("abc");
the final ouput would be abc, that 's all.