Most probably you missed the semicolon (;) after the declaration of one of your classes.
class Shape { public: unsigned int numVertices; }; // <<< this is the semicolon that you are most probably missing. class Triangle : public Shape { };