How do I check at runtime if an object is of type ClassA or of derived type ClassB? In one case I have to handle both instances separately
ClassA* SomeClass:
Why not have a doSomething() method on ClassB that handles ClassB's extra capabilities? This is the essence of polymorphism.