对于:
vector<string> text;
string word;
while(cin >> word)
{
text.push_back(word);
}
如何退出循环呢?
- 在windows下面:ctrl+z
- 在Linux下面:ctrl+d
对于:
vector<string> text;
string word;
while(cin >> word)
{
text.push_back(word);
}
如何退出循环呢?