Possible Duplicate:
Regular cast vs. static_cast vs. dynamic_cast
I learned how static_cast works by this question. Why is it important to use static_cast instead of reinterpret_cast here?
But if static_cast does knows classes' inheritance-relationship, why does dynamic_cast exist? And when do we must use dynamic_cast?