+ 2
A question of shortcuts
What does "\r" do in c++?
1 Respuesta
+ 4
Mohammad Al_Ayoubi \r is a carriage return character; it tells your terminal emulator to move the cursor at the start of the line. The cursor is the position where the next characters will be rendered. So, printing a \r allows to override the current line of the terminal emulator..
Read this :
https://stackoverflow.com/questions/7372918/whats-the-use-of-r-escape-sequence#:~:text=%5Cr%20is%20a%20carriage%20return,line%20of%20the%20terminal%20emulator.