Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <cstdlib>
- #include <string>
- #include <conio.h>
- using namespace std;
- string imie, nazwisko;
- int nr_tel;
- int main()
- {
- fstream d,w;
- d.open("dane.txt",ios::in);
- w.open("wyniki.txt",ios::out);
- if(d.good()==false)
- {
- cout<<"popsules cos moze utworz plik zal mi cie"<<endl;
- exit(0);
- }
- string l;
- int i=0;
- while(getline(d,l)) {
- i=l.length();
- w<<l[i-1]<<endl;
- }
- d.close();
- w.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement