Challenge 1: Reproducing Object Slicing — Possible Solution ==================================================================== #include class Shape { public: virtual double area() { return 0; } }; class Circle : public Shape { public: double radius; Circle(double r) : radius(r) {} double area() override { return 3.14159 * radius * radius; } }; int main() { Circle c(5.0); Shape s = c; // sliced -- s is now just a plain Shape std::cout << s.area() << std::endl; return 0; } Output: 0 WHY THIS WORKS AS AN ANSWER ------------------------------ Shape s = c; copies c by VALUE into a plain Shape variable -- since s's static type is Shape, only the Shape-sized portion of c is copied; Circle's own radius member and its override of area() are left behind entirely. Calling s.area() therefore calls Shape::area() (returning 0) rather than Circle::area(), exactly the "virtual dispatch silently lost" symptom the chapter describes -- confirmed here since Circle's own area() would have returned 78.5397... instead.