I have a program where Employee is the base class; Salaried class and Hourly class are derived from the Employee class. I have to create two employee pointers for the derived class:
Employee *employeeList1 = new Salaried(10000, 3)
Employee *employeeList2 = new Hourly(50, 40, “fill time”)
My question, would these pointers be declared in the .h file with the constructor or in the main cpp file? Have read the tutorial, still not clear on this. Thanks!
Those are executable statements. They would go in the .cpp file.
Topic archived. No new replies allowed.