in
int salary() const { return mySalary; }
as far as I understand const is for this pointer, but I\'m not sure. Can any one tell me what is the us
It's a const method. It means that it won't modify the member variables of the class nor will it call non-const methods. Thus:
const
const foo bar; bar.m();
is legal if m is a const method but otherwise wouldn't be.
m