fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <fstream>
  4. #include <cstdlib>
  5. using namespace std;
  6.  
  7. void Roberto_Bolano ( ifstream& infile1,string file1);
  8.  
  9. int main () {
  10. ifstream infile1;
  11. infile1.open ("input.txt");
  12. string file1;
  13. Roberto_Bolano (infile1,file1);
  14. infile1.close();
  15. return 0;
  16. }
  17.  
  18. void Roberto_Bolano ( ifstream& infile1,string file1) {
  19. while(!infile1.eof ()) {
  20. infile1 >> file1;
  21. cout << file1 << " ";
  22. }
  23. }
  24.  
Runtime error #stdin #stdout 0.01s 3472KB
stdin
Standard input is empty
stdout