title: C++: How a class uses object as parameter
body: <pre><code>class Agent
  {
  public:
     Agent() {}
     ~Agent() {}
     virtual bool Do() = 0;
  };
  
  class GameAgent : public Agent
  {
  public:
      GameAgent() {}
      ~GameAgent() {}
  };
  </code></pre>
  
  <p>I would like to initialize this <code>GameAgent</code> like</p>
  
  <pre><code>GameAgent* m_pGameAgent = new GameAgent();
  </code></pre>
  
  <p>And I got this error message.</p>
  
  <blockquote>
    <p>Error  12  error C2259: 'GameAgent' : cannot instantiate abstract class</p>
  </blockquote>
  
  <p>How I can I fix it? I can not change the structure of <code>Agent</code>.</p>