Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <fstream>
  4. using namespace std;
  5.  
  6. int main(){
  7.  
  8. setlocale(LC_ALL, "rus");
  9.  
  10. char mass[10000];
  11. ifstream fin("text.txt");
  12.  
  13. if (!fin.is_open()) {
  14. cout << "Файл не может быть открыт!\n";
  15. }
  16. else{
  17. while (!fin.eof()) {
  18. fin >> mass;
  19. cout << mass << endl;
  20. }
  21. fin.close();
  22. }
  23. system("pause");
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement