The earnings
function pointer in the vtable for class CommissionEmployee
points to CommissionEmployee
’s earnings
function that returns the employee’s gross sales multiplied by the commission rate. The print
function pointer points to the CommissionEmployee
version of the function, which prints the employee’s type, name, social security number, commission rate and gross sales. As in class HourlyEmployee
, both functions override the functions in class Employee
.