6 Bottom line, please

Do not use reinterpret cast! That's rule number one.

Rule number two, you can safely use static_cast to up cast in most cases (cannot think of one case that won't work), and this does not use any run-time resources.

Rule number three, if you need to down cast, make the class hierarchy polymorphic, and use dynamic_cast with error (NULL pointer) checking code.


Copyright © 2006-10-12 by Tak Auyeung