Class member functions can be declared as const.When this is done,that function cannot modify the object that invokes it.Also,a const object cannot invoke a non-const objects.However,a const member function can be called by either const or non-const objects.
example:
class{
int some_var;
public:
unt f1() const;
};
Liked By
Write Answer
How can specify a const member function?
Join MindStick Community
You have need login or register for voting of answers or question.
AVADHESH PATEL
15-Jun-2013