Dynamic_cast supports casting to a sibling class however, the class must be polymorphic. Office contains a the member function
void clean_it()
which is not virtual and therefore not polymorphic. So the dynamic_cast returns a zero as it rightly should. Correct me if this is a typo and the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.