views:

25

answers:

1

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));   
}
+1  A: 

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

Bander