As you see, the Square class inherits properties from the Polygon class. However, I am getting the following compilation errors.
1 2 3 4
basicInheritance.cpp: In constructor ‘Square::Square(int)’:
basicInheritance.cpp:24: error: no matching function for call to ‘Polygon::Polygon()’
basicInheritance.cpp:13: note: candidates are: Polygon::Polygon(int, int)
basicInheritance.cpp:5: note: Polygon::Polygon(const Polygon&)
Why is the default constructor for Polygon being called? I thought that I had explicitly called a custom constructor for Polygon in the constructor for Square.