Guest User

Untitled

a guest
Dec 16th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. string f = "server_mods.txt";
  2. string str;
  3. ifstream file;
  4. file.open(f);
  5. if (file.is_open())
  6. {
  7. while (!file.eof())
  8. {
  9. file >> str;
  10. cout << str << endl;
  11. // getline() не работает, все так же
  12. // по символьно через char* тоже не робит
  13. }
  14. }
  15. else
  16. {
  17. cout << "Error, when opening file!" << endl;
  18. }
Add Comment
Please, Sign In to add comment