string blahBlah() const;
123456789101112131415
class foo{ //... string bar() const; //promise to not modify the calling object string zoo(); }; void asdf(const foo &obj){ obj.bar(); //fine obj.zoo(); //error: } int main(){ foo obj; obj.bar(); //the state of the object remains the same }