newbie here!
I am reading a code and I see the author frequently writing a member function as
const int func (const scalar& a) const
// etc
You see there are three const here, now I understand the middle one, const scalar& a, that aims to not change the object a, but what about the other two const?
Is it a good habit that I should do this all the time, to protect blahblah unchanged?
Thanks a lot!