Clion - How to carriage return in console prints?
I'm coding in C and I want to do a carriage return in a print statement. I have the following two lines:
printf("Hello");
printf("\rWorld");
This should only print World because of the carriage return that would move the caret to the front of the print line. However it does not do this in Clion (and I think the other Jetbrains editors as well).
This currently prints:
Hello
World
What am I doing wrong? How do I enable carriage returns?
Please sign in to leave a comment.
http://www.keil.com/support/docs/1265.htm
Try using \r\n instead of \r