Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 2
A question of shortcuts
What does "\r" do in c++?
1 Resposta
+ 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.