jelenpivo123

main3.cpp

Oct 7th, 2018
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. #include <string>
  2. #include <iostream>
  3. #include "Profesor.h"
  4. #include "Asistent.h"
  5.  
  6. using namespace std;
  7.  
  8.  
  9. Profesor operator <(Profesor p1, Profesor p2) {
  10. if (p1.radniStaz<p2.radniStaz) {
  11. return p1;
  12. }
  13. else {
  14. return p2;
  15. }
  16. }
  17.  
  18.  
  19. int main() {
  20.  
  21. Profesor p1("Pera","Peric","1234567897897","456asd5",10,"12.10.2010.","Biometrija irisa",2007);
  22. //p1.ispisiPodatke();
  23. //ispisiBrojRadneKnjizice(p1);
  24.  
  25. Profesor p2("Milan", "Milic", "4445556667778", "11122dsda", 15, "12.10.2010.", "Tema...", 2009);
  26.  
  27. Asistent a1("Zika", "Zikic", "456465465465465", "445sdsa6", 5, "09.05.2013.", "Neka tema...", 2014);
  28. //a1.ispisiPodatke();
  29. Asistent a2("Nikola", "Nikolic", "1112223331112", "111ssss2", 3, "25.03.2015.", "Neka tema...", 2016);
  30.  
  31.  
  32. Profesor p = p1 < p2;
  33.  
  34. //(p1 < p2).ispisiPodatke();
  35.  
  36. (a1 < a2).ispisiPodatke();
  37.  
  38. system("pause");
  39. return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment