fork download
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4.  
  5. int main() {
  6.  
  7. istream * is = &cin;
  8. string str;
  9.  
  10. if (!is){
  11. cout << "Error!" << endl;
  12. }
  13.  
  14. is->seekg(5);
  15. getline(*is, str);
  16. cout << str << endl;
  17.  
  18. return 0;
  19.  
  20. }
Success #stdin #stdout 0s 3032KB
stdin
0123456789
stdout
56789