## 21.7 Muliple Inheritance (cont.)

- Dynamic cast and `typeid` work just as we'd like:

  >     Student* mary = . . .;
  >     TeachingAssistant* lab_instructor
  >        = dynamic_cast<TeachingAssistant*>(mary);
  >     if (lab_instructor != NULL)
  >        cout << "Yes, mary is a TeachingAssistant. \n";
  >     else
  >        cout << "No, mary is not a TeachingAssistant. \n";

prev |top |next