开发者

copy using istream_iterator

开发者 https://www.devze.com 2023-01-20 08:30 出处:网络
What would be end of source in this case when getting a string input from console? int main() { std::vector<std::string> str;

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

精彩评论

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