Why allow s = c?
Class Shape implicitly has a Shape::Shape(const Shape&) copy constructor and an analogous assignment operator
We can bind a const Shape& parameter to (the Shape part of) a Circle object
Only the Shape part is actually copied
Previous slide
Next slide
Back to first slide
View graphic version