Home > Back-end >  Const char * const * specific what meaning be
Const char * const * specific what meaning be

Time:04-16

Bosses const char * const * p specific what meaning be?

CodePudding user response:


A pointer to a const pointer to a const char *

CodePudding user response:

I tell you a way of understanding, first remove the main types, where it is not influence the results, that is, into a
Const * const * p
In turn each const left something out, that there are two const, so two results
* const * p
* p
Then the const deleted, the remaining
* * p
* p
The two is the object cannot be assignment (can not change the object), is the * * wrong * p=p=XXX XXX also wrong
Another example: const char * * * * * * * * p; What meaning is: it is * * * p can't be rewritten
  • Related