It‘s not the same. The const modifier can be applied to the value, or the pointer to the value.
int * const
A constant pointer (not modifiable) to an integer (its value can be modified)
const int *
A modifiable pointer to a constant integer (its value can‘t be modified)
So you can imagine:
const int * const;
int * const 和 const int *,布布扣,bubuko.com
时间: 2024-10-11 04:37:59