Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <fstream>
- using namespace std;
- void plik(string adres)
- {
- istream odczyt;
- string z;
- odczyt.seekg(0);
- odczyt.open(adres);
- while(!plik.eof())
- {
- getline(odczyt, z);
- cout << z << endl;
- }
- odczyt.close();
- }
- int main()
- {
- string a = "plik1.txt";
- plik(a);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement