1
istream_iterator<string> input(cin), eos;
vector<string> text;

copy(input, eos, back_inserter(text));

如何在 Ubuntu Linux 和 Windows 上中断输入(cin) ?

4

1 回答 1

0

在 Ubuntu Linux 上:Ctrl + d(D) 在 Windows 上:Ctrl + z(Z)

于 2012-11-14T03:40:25.363 回答