given variable that define as char** const var;
, what is defined here as const (var or *var) ?
And in the general case, how can I know it? (namely, given it: char**** const var
, what is defined here as const?)
given variable that define as char** const var;
, what is defined here as const (var or *var) ?
And in the general case, how can I know it? (namely, given it: char**** const var
, what is defined here as const?)
You read right-to-left. The const refers to what is to the left. The exception is that a declaration may start with const, in which case it refers to the thing on the right.
char const * const
is a constant pointer to a constant char. So char ** const
is a constant pointer to a pointer-to-char.