## 21.3 Virtual and Nonvirtual Overriding (cont.)

- Methods invoked via `this` ptr follow same rules:

  >     void Employee::print(ostream& out) const
  >     {
  >        out << "Name " << get_name()
  >        // Static binding, same as Employee::get_name()
  >           << " income " << annual_income() << "\n";
  >           // Dynamic binding, same as this->annual_income()
  >     }

prev |top |next