int *const和const int*

int *const a——>a是指向整数的常量指针,指针本身只读

const int* b——>b是指向常量整数的指针,整数本身只读

const 离谁近就是修饰谁的。

 

你可能感兴趣的:(C++)