Q: Cannot allocate an object of abstract type 'Rectangle' I have 2 classes :
Forme.h
class Forme
{
private:
    string _nom;

protected:
    Forme(string nom){nom = _nom;}
    ~Forme();


    virtual string ToString()const = 0;
};

Rectangle.h
class Rectangle : public Forme
{
private :
    int _x;
    int _y;
    unsigned int _largeur;
    unsigned int _hauteur;
public :
    Rectangle() : _x(0) , _y(0) , _largeur(0) , _hauteur(0) , Forme("") {};
    Rectangle(int x, int y, int largeur, int hauteur, string nom): _x(x) , _y(y) , _largeur(largeur) , _hauteur(hauteur) , Forme(nom) {}
    Rectangle(const Rectangle& rectangle) : Forme(""){/*nothing wroten yet */};
    virtual ~Rectangle() {}


    virtual string toString() const {return "test";}
};

main.cpp :
Rectangle* r = new Rectangle(0,0,5,5,"test");

But when I compile this code, I get this Error :

main.cpp | error: cannot allocate an object of abstract type 'Rectangle'

Can someone explain me why I get this error? I don't know why I get this error because toString() is defined in Rectangle.h, I didn't wrote anything in Rectangle.cpp and Forme.cpp.
Thank you.
(Sorry for my bad English level, I'm French)

A: That's a typo:
base class
class Forme
{
    virtual string ToString()const = 0;
};

derived class
class Rectangle : public Forme {
    virtual string toString() const {return "test";}
}

Also:
~Forme();

this has no definition. Fix it with {} and possibly mark it as virtual.
