21.7.1 Name Ambiguity
- Names of inherited operations may clash
- E.g., suppose both Employee and Student provide a
get_id method, that refer to different IDs:
TeachingAssistant* fred = new TeachingAssistant();
cout << "Your number is " <<
fred->get_id() << "\n";
// Error, ambiguous member function name
- 2 resolutions:
prev
|top
|next