21.5 (cont.) RTTI - the Dynamic Cast
- For casting down the inheritance hierarchy.
- Takes a pointer or reference
- Returns the dynamic type of the argument, if it matches the type
parameter
- Otherwise, returns NULL (for pointer), or throws
bad_cast
- static_cast performs no run-time check
prev
|top
|next