Assuming the definition:
int i = 10;
int *p = &i;
Why is *p a valid lvalue here:
*p+=10;
Shouldn’t *p evaluate to the value of the int stored at &i, ie. 10, and hence generate a “Not an lvalue” error?
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.
*pis such an expression that refers to a region of storage. This is different than say10+=10;because10doesn’t refer to a region of storage like a variable would.