Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <list>
  4. #include <vector>
  5. #include "employee.h"
  6. using namespace std;
  7.  
  8. class Company
  9. {
  10. public:
  11. Company* comp;
  12. void hire(Employee& emp, float putSalary);
  13. void fire(Employee& emp);
  14. void endOfMonth(Company& comp);
  15. Company(float);
  16. // static float moneyamount;
  17. private:
  18. static float budget;
  19. vector <Employee>* Employees;
  20. };
  21.  
  22. void Company::endOfMonth(Company& comp)
  23. {
  24. for (iterat=0; iterat < Employees->size() ; iterat++)
  25. {
  26.  
  27. cout << (*Employees)[iterat].fullName << endl;
  28. cout << (*Employees)[iterat].getSalary() << endl;
  29. comp.budget = comp.budget - (*Employees)[iterat].getSalary();
  30.  
  31. }
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement