- Handle (pointer/reference)
- Base-pointer can aim at derived-object; but can only call base-class functions
- Calling derived-class functions is a compiler error; functions not defined in base-class
- Common theme
- Data type of pointer/reference determines functions it can call
Figure 5.8:
Attempting to invoke derived-class-only functions via a base-class
pointer. (part 1 of 2)
|
Figure 5.9:
Attempting to invoke derived-class-only functions via a base-class
pointer. (part 2 of 2)
|
2004-07-29