First page Back Continue Last page Graphics
Restrictive Type Casting
dynamic_cast
- Assume High and Low are two classes and ph is type High * and pl is type Low *.
- pl = dynamic_cast<Low *> ph
- assigns a Low * pointer to pl ONLY if Low is an accessible base class (direct or indirect) to High.