\r为回车:光标回到行首

\n为换行:另起一行

cout << "hello\r" << "world"; //输出world

cout << "hello\n" << "world"; //输出hello

                                           //      world