How do I check at runtime if an object if of type ClassA or of derived type ClassB? In one case I have to handle both instances separately
ClassA* SomeClass::doSomething ( ClassA* )
{
if( /* parameter is of type base class */) {
} else if { /* derived class */ ) {
}
}
Maybe I could say that the derived class ClassB has some special capabilities. But how do I do that without changing the existing class ClassA ?