It's not a good idea to store derived class objects in an array of the type base class since that will truncate (or slice-off) the derived class object's information. You'll need to store pointers-to-objects instead of actual objects as jlou as posted in the example code. However, dynamic_cast only succeeds if there is at least one function declared as virtual (it's sometimes called a "polymorphic cast").