Challenge 1: A const Member Function, and What Happens Calling a Non-const One on a const Object — Possible Solution ==================================================================== #include class Circle { public: double radius; Circle(double r) { radius = r; } double area() const { return 3.14159 * radius * radius; } void setRadius(double r) { radius = r; } }; int main() { const Circle c(5.0); std::cout << c.area() << std::endl; // fine -- area() is const c.setRadius(10.0); // compile error return 0; } Compile error (representative message): error: passing 'const Circle' as 'this' argument discards qualifiers [-fpermissive] c.setRadius(10.0); ^ WHY THIS WORKS AS AN ANSWER ------------------------------ area() is marked const and only reads radius, so calling it on the const Circle c compiles fine. setRadius() is NOT const and modifies radius, so calling it on the same const object is rejected by the compiler -- exactly the chapter's own rule that a const object can only call const-qualified member functions on itself, enforced as a genuine compile error rather than a runtime check.