## Advanced Topic 20.1 (cont.)

- To fix:
  - Override the function in the derived class
  - call the base class' method explicitly

>     class Manager : public Employee
>     {
>        . . .
>        virtual void set_salary(int new_salary);
>        void set_salary(int new_salary, int yearly_bonus);
>     };

>     void Manager::set_salary(int new_salary)
>     {
>        Employee::set_salary(new_salary); // Invoke the base class function
>     }

prev |top |next