\r为回车:光标回到行首
\n为换行:另起一行
cout << "hello\r" << "world"; //输出world
cout << "hello\n" << "world"; //输出hello
// world
时间: 2025-01-11 12:24:53
\r为回车:光标回到行首
\n为换行:另起一行
cout << "hello\r" << "world"; //输出world
cout << "hello\n" << "world"; //输出hello
// world