Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main()
- {
- ifstream Plik;
- string slowo;
- Plik.open("jakis_plik.txt");
- while(!Plik.eof()) // pętla będzie się wykonywać dotąd, dopóki NIE jesteśmy na końcu pliku (eof
- {
- Plik >> slowo;
- cout << slowo << ' ';
- }
- Plik.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement