Advertisement
NoName977

main.cpp

Jan 21st, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.11 KB | None | 0 0
  1. #include "Pracownik.h"
  2. #include "Data.h"
  3. #include "Napis.h"
  4. #include "ListaPracownikow.h"
  5.  
  6. int main()
  7. {
  8.  
  9.     Pracownik *nowy;
  10.     Napis imie, Nazwisko;
  11.     int s;
  12.     ListaPracownikow lista;
  13.     while(1)
  14.     {
  15.         cout << "1 - dodanie nowego pracownika" <<endl;
  16.         cout << "2 - Usuniecie Pracownika" << endl;
  17.         cout << "3 - Wyswietl liste" <<endl;
  18.         cout << "4 - Wyszukanie Pracownika: "<<endl;
  19.         cin>>s;
  20.         switch(s)
  21.         {
  22.         case 1:
  23.             cin.clear();
  24.             nowy = new Pracownik();
  25.             nowy->Wpisz();
  26.             lista.Dodaj(*nowy);
  27.             break;
  28.         case 2:
  29.             nowy = new Pracownik();
  30.             nowy->Wpisz();
  31.             lista.Usun(*nowy);
  32.             break;
  33.         case 3:
  34.             lista.WypiszPracownikow();
  35.             break;
  36.         case 4:
  37.             cout<<"Podaj imie: ";
  38.             imie.Wpisz();
  39.             cout<<"Podaj Nazwisko: ";
  40.             Nazwisko.Wpisz();
  41.             lista.Szukaj(Nazwisko.Zwroc(), imie.Zwroc());
  42.             break;
  43.         default:
  44.             return 0;
  45.     }
  46.  
  47. }
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement