fork(28) download
  1. #include <sstream>
  2. #include <iostream>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8. string s;
  9. stringstream ss("what to do ");
  10. bool read1 = (ss >> s);
  11. bool read2 = (ss >> s);
  12. bool read3 = (ss >> s);
  13. bool read4 = (ss >> s);
  14.  
  15. cout << read1 << read2 << read3 << read4 << endl;
  16. }
Success #stdin #stdout 0.01s 2816KB
stdin
Standard input is empty
stdout
1110