fork download
  1. class Worker
  2. {
  3. public :
  4. enum Position { EMPLOYEE, BOSS };
  5. Worker(Position p) : p(p) {}
  6. private :
  7. Position p;
  8. double salary;
  9. };
  10.  
  11. class Employee : public Worker
  12. {
  13. public :
  14. Employee() : Worker(EMPLOYEE) {}
  15. private :
  16. };
  17.  
  18. int main()
  19. {
  20. Employee e;
  21. }
  22.  
Success #stdin #stdout 0.01s 2676KB
stdin
Standard input is empty
stdout
Standard output is empty