Challenge 1: The Diamond Problem, Reproduced — Possible Solution ==================================================================== #include class Animal { public: std::string name; }; class Swimmer : public Animal {}; class Flyer : public Animal {}; class Duck : public Swimmer, public Flyer {}; int main() { Duck d; d.name = "Donald"; // compile error here return 0; } Representative compile error: error: request for member 'name' is ambiguous d.name = "Donald"; ^~~~ note: candidates are: 'std::string Animal::name' (of object at offset ...) [via Swimmer] note: 'std::string Animal::name' (of object at offset ...) [via Flyer] WHY THIS WORKS AS AN ANSWER ------------------------------ This reproduces the exact scenario the chapter describes -- Duck inheriting from both Swimmer and Flyer, each of which independently inherits from Animal without virtual -- and shows the resulting "ambiguous" compile error naming both candidate paths (via Swimmer, via Flyer) explicitly, confirming Duck genuinely contains two separate Animal sub-objects rather than one.