title: Allocating an object of abstract class type when trying to create a SceneNode
body: <p>I have an issue I don't manage to solve in C++.</p>
  
  <p>I have a class called SceneNode. In this class, there isn't any virtual function and in the private members, I have a vector of unique_ptr and a raw pointer to a SceneNode object.
  When try to allocate a new SceneNode, I get the following error: allocating an object of abstract class type "SceneNode".</p>
  
  <p>Here's the code:</p>
  
  <pre><code>    class SceneNode : public  sf::Drawable,
                    public  sf::Transformable,
                    private sf::NonCopyable
  {
  
      //OVERVIEW: A SceneNode is a node from the scene graph. It represents a graphical element
      //A typical SceneNode is (PARENT, CHILDREN, TRANSFORM)
      //With TRANSFORM containing several information:
      //TRANSFORM.POS = the position of this
      //TRANSFORM.ROTATION = the rotation of this
  
      //The transformation of this is always relative to its parent
      //Therefore, TRANSFORM.POS is the position of this, relatively to its parent
  
  
      //NB: - a SceneNode is not copyable !
      //    - It's an abstract class
  
  public:
  
      //--------------------------------------------
      //Typedefs
      //--------------------------------------------
      typedef std::unique_ptr&lt;SceneNode&gt; UniquePtr;
      typedef sf::Vector2f               Position;
  
  public:
  
      //--------------------------------------------
      //Constructors
      //--------------------------------------------
      SceneNode();
          //REQUIRES: /
          //MODIFIES: this
          //EFFECTS: initializes this with this_post.PARENT = no parent
          //         and this.CHILDREN = { ⦰ }
  
  public:
  
      //--------------------------------------------
      //Public member functions
      //--------------------------------------------
      void attachChild(UniquePtr child);
          //REQUIRES: child != nullptr
          //MODIFIES: this
          //EFFECTS: if child == nullptr, stops the program;
          //         else, this_post.CHILDREN = this.CHILDREN U { child }
  
      UniquePtr detachChild(const SceneNode&amp; child);
          //REQUIRES: /
          //MODIFIES: this
          //EFFECTS: if child in this.CHILDREN, this_post.CHILDREN = this.CHILDREN \ child &amp;&amp; returns a unique_ptr to the child, don't catch it to let it being freed
  
      sf::Transform getWorldTransform() const;
          //REQUIRES: /
          //MODIFIES: /
          //EFFECTS: returns the absolute transformation of this
  
      Position getWorldPosition() const;
          //REQUIRES: /
          //MODIFIES: /
          //EFFECTS: returns the absolute position of this
  
  
  
  private:
  
      //--------------------------------------------
      //Representation
      //--------------------------------------------
      SceneNode*             mParent;
      std::vector&lt;UniquePtr&gt; mChildren;
  
  
  
  };`
  </code></pre>
  
  <p>What can I do ? Thanks in advance</p>