title: Expression must have class type. - Vector of class objects
body: <p>Can someone point me in the right direction of where to look please? I'm getting the above error. </p>
  
  <p>std::vector of class States declared in game engine class.</p>
  
  <pre><code>class GameEngine
  {....
   private:
   std::vector&lt;State&gt; *m_states;
  }
  </code></pre>
  
  <p>Within the Constructor:</p>
  
  <pre><code>m_states = new std::vector&lt;State&gt;;
  </code></pre>
  
  <p>Add state function</p>
  
  <pre><code>void GameEngine::AddState(State *state, bool change)
  {
     m_states.push_back (state);
     .....
  }
  </code></pre>
  
  <p>"Error  3   error C2228: left of '.push_back' must have class/struct/union"</p>
  
  <p>Thanks in advance. </p>