The new implementation of getBonus() in Manager is NOT overloading since the two definitions occur in different "scopes". One is in the Employee class and the other is in the Manager class.
Overloading is when two functions of the SAME name are defined in the same scope. In this case they MUST have different parameter lists.
Overriding is when a function of the SAME name AND the SAME parameter list is defined in both a base class and a derived class.
In C++, the base class function must be 'virtual' for overriding. Otherwise, it will not be put in the virtual function table.
Dynamic DispatchEmployee *p; ... cout << p->getBonus() << endl;
Dynamic dispatch refers to the determination of which implementation of getBonus should be called. It is dynamically determined (at run time) depending on the object that p points to.
If p points to an Employee object, the virtual function table will point to the Employee table and Employee's getBonus will be used.
If p points to an Manager object, the virtual function table will point to the Manager table and Manager's getBonus will be used.