title: How do I store different classes in a single vector?
body: <p>So I have a vector full of all the objects for my game; things like the player object, enemy object, walls, etc... All things in the vector are children of <code>Framework</code>, so I made the vector type <code>Framework</code> because that was the closest thing to a universal data type for them.</p>
  
  <p>The problem was it wasn't running overridden functions from the objects it stored. So I Googled it to find out apparently I'm object slicing by storing them as <code>Framework</code>. So my question is then, how do store all these objects in one list?</p>
  
  <p>Just for reference, this is where the supposed-to-be-overridden functions are called.</p>
  
  <pre><code>for (vector&lt;Framework&gt;::iterator num = gameObjects.begin(); num != gameObjects.end(); ++num)
  {
      //The current thing
      Framework currentObject = *num;
      currentObject.frameEvent();
      currentObject.frameEndEvent();
      currentObject.drawEvent();
  }
  </code></pre>
  
  <p>Thanks in advance.</p>