Answer
Const correctness uses const-qualified types to express which access paths may modify an object. • A const member function treats the object expression as const-qualified. • Pointers can qualify the pointer, the pointed-to object, or both. • const does not make every reachable object deeply immutable.
💡 C++ Example
class Account {
public:
int balance() const { return balance_; }
private:
int balance_{};
};
⚡ Quick Revision
const documents and enforces non-modifying access through a particular type.