我在Ubuntu下编写了如下程序,使用制表符:
cout << "Please enter one of the following choices: " << endl;
cout << "c) carnivore\tp) pianist." << endl
<< "t) tree\tg) game" << endl;
并获得了如下输出
Please enter one of the following choices:
c) carnivore p) pianist.
t) tree g) game
但我希望获得如下格式的输出:
Please enter one of the following choices:
c) carnivore p) pianist
t) tree g) game
想问一下我的问题出在哪里,万分感谢。