For example, is
int const x = 3;
valid code?
If so, does it mean the same as
const int x = 3;
?
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.
They are both valid code and they are both equivalent. For a pointer type though they are both valid code but not equivalent.
Declares 2 ints which are constant:
Declares a pointer whose data cannot be changed through the pointer:
Declares a pointer who cannot be changed to point to something else: