fork download
  1. #include <fstream>
  2. #include <iostream>
  3.  
  4.  
  5.  
  6.  
  7.  
  8. int main()
  9. {
  10. char filename [81];
  11. std :: cin.getline (filename, 80);
  12.  
  13. std :: ofstream file_out (filename);
  14. if (! file_out )
  15. {
  16. std :: cout << "File" << filename;
  17. return -1;
  18. }
  19. std :: cout << filename << " " << "open";
  20. file_out << "I am Blaxxon" << std :: endl;
  21.  
  22. file_out.close();
  23.  
  24. return 0;
  25. }
  26.  
  27.  
Runtime error #stdin #stdout 0s 4284KB
stdin
Standard input is empty
stdout
File