I\'m just getting into derived classes, and I\'m working on the famous Shape class. Shape is the base class, then I have three derived classes: C
Shape
C
Almost. Instead of redeclaring the parameters here:
Rectangle(double w, double h) : Shape(double w, double h)
You should simply "pass them through" (to give an inexact phrasing):
Rectangle(double w, double h) : Shape(w, h) { }