C++: is instance descendant of class
<p>Assume we have three classes A, B and C. B is derived from A and C is derived from B.
Now we have a pointer that points to an object of class A. Due to Polymorphism it can actually point to instances of all three classes.</p>

<p>With typeid() i can check what type the pointer actually refers to. But I'm trying to determine if it points to any descendant of class B. That is to say I'm looking for some kind of IsDescendantOf(unkownclass, baseclass) function. Is there a why to do so in C++?</p>
