Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Pracownik.h"
- #include "Data.h"
- #include "Napis.h"
- #include "ListaPracownikow.h"
- int main()
- {
- Pracownik *nowy;
- Napis imie, Nazwisko;
- int s;
- ListaPracownikow lista;
- while(1)
- {
- cout << "1 - dodanie nowego pracownika" <<endl;
- cout << "2 - Usuniecie Pracownika" << endl;
- cout << "3 - Wyswietl liste" <<endl;
- cout << "4 - Wyszukanie Pracownika: "<<endl;
- cin>>s;
- switch(s)
- {
- case 1:
- cin.clear();
- nowy = new Pracownik();
- nowy->Wpisz();
- lista.Dodaj(*nowy);
- break;
- case 2:
- nowy = new Pracownik();
- nowy->Wpisz();
- lista.Usun(*nowy);
- break;
- case 3:
- lista.WypiszPracownikow();
- break;
- case 4:
- cout<<"Podaj imie: ";
- imie.Wpisz();
- cout<<"Podaj Nazwisko: ";
- Nazwisko.Wpisz();
- lista.Szukaj(Nazwisko.Zwroc(), imie.Zwroc());
- break;
- default:
- return 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement