#include <iostream> #include <fstream> #include <cstdlib> #include <string> using namespace std; int main() { fstream plik; string slowo1, slowo2, slowo3; plik.open( "dane.txt", ios::in | ios::out ); while (!(plik.eof())) { plik >> slowo1 >> slowo2 >> slowo3; cout << slowo1 << endl; cout << slowo2 << endl; cout << slowo3 << endl; } plik.close(); return( 0 ); }