title: How to determine actual object type at runtime in C++;
body: <p>Lets say we have a class hierarchy. At the bottom we have Base and at the top Derived.
  How to determine object class even if it is converted to base class pointer.</p>
  
  <pre><code>Base* b = new Derived():
  
  typeid(b).name(); // i want this to tell me that this is actually derived not base object
  </code></pre>
  
  <p>is there any way other than manual implementation of string field or such and virtual get function? </p>
  
  <p>PS: I talking about compiler-independent solution</p>