fork(1) download
  1.  
  2. #include <iostream>
  3. #include <sstream>
  4. #include <string>
  5. #include <iterator>
  6. #include <algorithm>
  7.  
  8. int main ()
  9. {
  10.  
  11. std::string string = "11 111 11 11";
  12. std::istringstream iss (string);
  13.  
  14. std::copy(std::istream_iterator<std::string>(iss),
  15. std::istream_iterator<std::string>(), std::ostream_iterator<std::string>(
  16. std::cout, " "));
  17. std::cout << std::endl;
  18.  
  19. return 0;
  20. }
  21.  
  22.  
Success #stdin #stdout 0s 3032KB
stdin
Standard input is empty
stdout
11 111 11 11