开发者

copy using istream_iterator

What would be end of source in this case when getting a string input from console?

int main()
{
   std::vector<std::string> str;
   copy (istream_iterator<std::string>(std::cin), istream_iterator<std::string>(), std::back_inserter(开发者_高级运维str));   
}


Terminal input or EOF . Ctrl+D in Unix. Ctrl+Z in Windows.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜