int *const plz;
means that I will not change where the pointer is pointing to, (ie increment or decrement the address)
const int *plz
means I will not change the variable the pointer is pointing to through the pointer
const int* const *plz
means both
I got a question
I just saw a function which looks like this
check_plz(const int *const plz)
what exactly does this mean, other than that the address cannot be incremented or decremented, if it also means that I cannot change the variable, why is the second * operand missing? Thank you
const int* const *plzis a double pointer andconst int *const plzis a single pointer. So these are very different indeed.const int* const *plzis the odd one out. You need to count the number of asterisks.http://www.thegeekstuff.com/2012/06/c-constant-pointers/refer this