I found an interesting fact that, in a class's const function, you can modify a member varialbe's deference, or the function's parameters, for example:
Isn't that misleading in C++'s const method's regulation.Code:class A{
int* ptr;
void foo(int x) const{
++*ptr;
x++;
}
};