Whats the difference between
Whats the difference between
Code:
const void X::y(){
//I think it assure's that even if it returns a pointer or a refrence it cant be changed
//such that the pointee or referenced item will be changed
//Plese Correct me If I am wrong
}
and
Code:
void X::y() const{
//Does not alter any data of the class
//so can't call any non-const member function too
//Plese Correct me If I am wrong
}
Edit: forgot to add a return Type.
So now is my Comments Correct ?? I think Wrong..