fork download
  1. #include <iostream>
  2. #include <fstream>
  3.  
  4. using namespace std;
  5.  
  6. int main(){
  7. ofstream fout;
  8. fout.open("Hello.txt");
  9.  
  10. if(fout.fail()){
  11. cout << "We can't write to your servers" << endl;
  12. }else{
  13. for(int i=0; i<80; i++){
  14. fout << "OWOW" << endl;
  15. }
  16. }
  17. fout.close();
  18.  
  19.  
  20. ifstream fin;
  21. fin.open("Hello.txt");
  22.  
  23. if(!fin.fail()){
  24. char buffer;
  25. fin >> buffer;
  26. cout << buffer;
  27. while(!fin.eof()){
  28. fin >> buffer;
  29. cout << buffer;
  30. }
  31. }
  32. fin.close();
  33.  
  34. return 0;
  35. }
Success #stdin #stdout 0s 3276KB
stdin
Standard input is empty
stdout
We can't write to your servers