Example of Downcasting
Cat * c = dynamic_cast <Cat *> (a); if (c) printf("variable was a cat"); else printf("variable was not a cat");
// we know, from elsewhere, that v is really a cat
Cat * c = static_cast<Cat *>(v);
Whenever possible, use the RTTI instead of standard unchecked cast conversions.