title: C++ inheritance - getClass() equivalent?
body: <p>Take the following C++ for example.</p>
  
  <pre><code>vector&lt;Animal&gt; listAnimal;
  
  class Fish : Animal ...
  class Mammal : Animal ...
  class Bird : Animal ...
  </code></pre>
  
  <p>If I then add them all to the list, and then grab them off the list arbitrary I wont know which subclass I am dealing with.  I in Java I could do <code>getClass()</code> or <code>thefish instanceof Fish</code>. How do I do this in C++?</p>