title: making a map in which the value type is an abstract class in C++
body: <p>I have an abstract class <code>element</code> and a child class <code>elasticFrame</code> :</p>
  
  <pre><code>class element
  {
  public:
      virtual Matrix getStiffness() = 0;
  protected:
      Matrix K;
  };
  
  
  class elasticFrame3d:public element
  {
  public:
      elasticFrame3d(double E, double G);
      virtual Matrix getStiffness();
  virtual Matrix getTransform();
  private:
      double E, G;
  };
  </code></pre>
  
  <p>what I want is to make a map like this:</p>
  
  <pre><code>map&lt;int, element&gt; elementMap;
  </code></pre>
  
  <p>but when I get this error:</p>
  
  <pre><code>error C2259: 'element' : cannot instantiate abstract class
  </code></pre>
  
  <p>is it even possible to do this? if yes how?</p>