Here is the test code:
int main()
{
const int a = 10;
int * b = const_cast<int *>(&a);
*b = 3;
printf("%x %x %d %d",&a,b,a,*b);
}
it print
22ff18 22ff18 10 3
I want to know why *b and a print different answer? it share the same address!