meaning of the statment

Jun 1, 2013 at 1:35pm
const char * GetName() const;
this is a member function of a class ..what is the exact meaning of this statment ? what does the const in start represent ?
Jun 1, 2013 at 1:48pm
first const represent that it returns pointer you cannot change values trough. It is read only.
Second const signals that it doesn't change any members and can de used on const object.
Topic archived. No new replies allowed.