Advertisement
Dawid_PAr

adres

Aug 7th, 2019
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <fstream>
  4.  
  5. using namespace std;
  6.  
  7. void plik(string adres)
  8. {
  9. istream odczyt;
  10. string z;
  11. odczyt.seekg(0);
  12. odczyt.open(adres);
  13. while(!plik.eof())
  14. {
  15. getline(odczyt, z);
  16. cout << z << endl;
  17. }
  18. odczyt.close();
  19.  
  20.  
  21. }
  22. int main()
  23. {
  24.  
  25. string a = "plik1.txt";
  26. plik(a);
  27.  
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement