fork(3) download
  1. #include <string>
  2. #include <sstream>
  3. #include <iostream>
  4.  
  5. int main() {
  6. std::string str;
  7. std::stringstream s("");
  8. std::getline(s, str, '|');
  9. std::cout << "good=" << s.good() <<
  10. " bad=" << s.bad() <<
  11. " fail=" << s.fail() <<
  12. " eof=" << s.eof() << std::endl;
  13. return 0;
  14. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
good=0 bad=0 fail=1 eof=1