fork(4) download
  1. #include <iostream>
  2. #include <string>
  3. #include <sstream>
  4.  
  5. int main()
  6. {
  7. std::istringstream iss { "Cpp|is|fun" };
  8.  
  9. std::string s;
  10. while ( std::getline( iss, s, '|' ) )
  11. std::cout << s << std::endl;
  12.  
  13. return 0;
  14. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
Cpp
is
fun