Last active
November 17, 2015 19:32
-
-
Save csullivan/e567f0ad9b411bfd1b59 to your computer and use it in GitHub Desktop.
Run-Time Type Information (RTTI) check with dynamic_cast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auto thing = dynamic_cast<derived_type*>(object->GetBaseObject()); | |
if(thing!=nullptr) { | |
thing->MethodOfDerivedClass(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment