fork download
  1. #include <algorithm>
  2. #include <iostream>
  3. #include <iterator>
  4. #include <string>
  5. #include <vector>
  6.  
  7. int main() {
  8.  
  9. std::vector<std::string> v;
  10.  
  11. std::copy( std::istream_iterator<std::string>(std::cin),
  12. std::istream_iterator<std::string>(), std::back_inserter(v) );
  13.  
  14. for( const auto& s : v )
  15. {
  16. std::cout << s << std::endl;
  17. }
  18.  
  19. return 0;
  20. }
Success #stdin #stdout 0s 3480KB
stdin
the quick brown fox jump over the lazy dog
stdout
the
quick
brown
fox
jump
over
the
lazy
dog