title: c++ An Array/List of differing classes
body: <p>I haven't done much polymorphism in c++, and it's been a long time since I done it in other languages, so I'd like some input as to if what I'm trying to achieve is even possible.</p>
  
  <p>I have a class "Entity", and several other 'specialized' sub-classes which inherit Entity. These sub-classes all have completely different methods (<strong>not</strong> overriding/reimplementing the same one), as they need to perform different functions.</p>
  
  <p>I'm looking for a way to organize all of these "Entities" into a single list. If I were to create a single array of type "Entity" and assign the sub classes to the array, I would no longer be able to call any of the sub-class functions, only the parent "Entity" functions. </p>
  
  <p>The only messy way I can immediately think of is to create an array for each sub-class, which doesn't seem that neat at all when I think of the amount of sub-classes I intend to make, not to mention the amount of memory the application would need to allocate.</p>
  
  <p>Is there any way to cleanly achieve something similar to what I'm trying to do?</p>