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 member function. It's a contract that the function does not change the state of the instance.
more here: http://www.fredosaurus.com/notes-cpp/oop-memberfuncs/constmemberfuncs.html