fork(9) download
  1. #include <iterator>
  2. #include <iostream>
  3. #include <string>
  4. #include <sstream>
  5.  
  6. int main() {
  7. using namespace std;
  8. string s = "Texto para dividir";
  9. istringstream iss(s);
  10. copy(istream_iterator<string>(iss),
  11. istream_iterator<string>(),
  12. ostream_iterator<string>(cout, "\n"));
  13. }
Success #stdin #stdout 0s 3464KB
stdin
Standard input is empty
stdout
Texto
para
dividir