Look at this program:
int main(){
const int a_const=10;
int * const a=const_cast<int * const>(&a_const);
*a=5;
}
So the address of a_const
and the pointer a
have the same value.
But changing the value of what a
is pointing to, doesn't a_const
.