Challenge 2: Fixing Challenge 1 With virtual — Possible Solution ==================================================================== #include class Shape { public: virtual double area() { return 0; } }; class Circle : public Shape { public: double radius; double area() override { return 3.14159 * radius * radius; } }; int main() { Shape *s = new Circle(); static_cast(s)->radius = 5.0; std::cout << s->area() << std::endl; delete s; return 0; } Output: 78.5397 Report: with virtual added to Shape::area() (and override on Circle::area(), confirming it genuinely overrides the base), the identical s->area() call through the same Shape* pointer now correctly returns the circle's real area instead of 0. The result changed because dispatch is now DYNAMIC -- resolved at runtime by looking up the actual object's real type (Circle) through its vtable, rather than statically by the pointer's own declared type (Shape). Nothing about the call site (s->area()) changed at all between Challenge 1 and this one -- only the virtual keyword did, and that single keyword is what flips the dispatch mechanism entirely. WHY THIS WORKS AS AN ANSWER ------------------------------ This isolates the ONE change (adding virtual/override) and shows the call site is otherwise identical, correctly attributing the changed result specifically to dispatch now happening at runtime via the object's real type rather than the pointer's declared type -- the precise mechanism the chapter names.