Home Forums C Programming NEED HELP URGENTLY !!!! Reply To: NEED HELP URGENTLY !!!!

#3399
Humayan
Participant

Do you mean a constant method of a class implementation? A constant member function of a class is a function that does not alter any class data members , like:
 
 

class X
{
public:
int age() const { return mAge; } //const get method
void age(int age) { mAge = age; } //( accessor! )
private:
int mAge;
};

 check out this link: http://www.uwyn.com/resources/uwyn_cpp_coding_standard/x496.html