I would like to know if its possible to call a non-const member function from a const member function. In the example below First gives a compiler error. I understand why it
By the definition of const
, a function should not modify the state of an object. But if it calls another non-const member, the object's state might get changed, so it's disallowed.
I know you said you didn't want to hear about this, but I think it's important for others that happen upon the question.