fork download
  1. #include<iostream>
  2. #include<fstream>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. setlocale(LC_ALL, "rus");
  8. string a = "bot.txt";
  9. ifstream n;
  10. n.open(a);
  11. if (!n.is_open())
  12. {
  13. cout << "Ошибка открытия файла" << endl;
  14. }
  15. else
  16. {
  17. char l;
  18. while (n.get(l))
  19. {
  20. cout << l;
  21. }
  22. }
  23. n.close();
  24.  
  25. return 0;
  26. }
Success #stdin #stdout 0s 4360KB
stdin
25173
65537
13849
stdout
Ошибка открытия файла