fork download
  1. #include "employee_factory.h"
  2.  
  3. #include "employee.h"
  4.  
  5.  
  6. QSharedPointer<AbstractEmployee> EmployeeFactory::makeEmployee(EmployeeRecord const& rec)
  7. {
  8. switch (rec.position)
  9. {
  10. case POSITION::EMPLOYEE:
  11. return QSharedPointer<AbstractEmployee>(new Employee(rec));
  12. break;
  13. case POSITION::MANAGER:
  14. return QSharedPointer<AbstractEmployee>(new Manager(rec));
  15. break;
  16. case POSITION::SALES:
  17. return QSharedPointer<AbstractEmployee>(new Sales(rec));
  18. break;
  19. default: break;
  20. }
  21.  
  22. return QSharedPointer<AbstractEmployee>(nullptr);
  23. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:30: fatal error: employee_factory.h: No such file or directory
 #include "employee_factory.h"
                              ^
compilation terminated.
stdout
Standard output is empty