What does this declaration mean?

 
int const* const* const* i;


or

 
int const* const* i;
The trick is to read pointer declarations backwards, and say '*' as "pointer".

So

int const* const* i;

Means that i is a pointer to a const pointer to a const int.

This means that i can be modified, but *i and **i cannot be modified.


The first example you posted is similar, just another pointer in there.
Last edited on
Topic archived. No new replies allowed.