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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It gets a bit easier if you group things the right way. For example,
*constis really one unit meaning “const pointer to” (you can read theconstas a subscript here:*const). I’d write it as:Also remember that declarations read “inside out”, starting at the identifier being declared.