title: C++ Inheritance and new instance of a class
body: <p>I have the following headers and classes:</p>
  
  <p>game.h:</p>
  
  <pre><code>#include "GameStateManager.h"
  class game
  {
      //bunch of lines here
  }
  </code></pre>
  
  <p>GameStateManager.h</p>
  
  <pre><code>#include "GameState.h"
  class GameStateManager
  {
      //bunch of lines here
  }
  </code></pre>
  
  <p>GameState.h</p>
  
  <pre><code>class GameState
  {
      //bunch of lines here
  }
  </code></pre>
  
  <p>PlayState.h</p>
  
  <pre><code>#include "GameState.h"
  class PlayState : public GameState
  {
      //bunch of lines here
  }
  </code></pre>
  
  <p>I need to create a new instance of PlayState in 'game.cpp'. How can I do that?</p>