How do I read C++ pointer construct?
c++, pointers
Solution
It gets a bit easier if you group things the right way. For example, `*const` is really one unit meaning "const pointer to" (you can read the `const` as a subscript here: `*const`). I'd write it as:
const int *const *const p1; // p1 is a const pointer to const pointer to const int
const int **p2; // p2 is a pointer to pointer to const int
Also remember that declarations read "inside out", starting at the identifier being declared.
Problem
This is a newbie C++ question. What is the difference between the following two constructs? ``` 1. const int* const* const x 2. const int** ``` How do I read these constructs?