I am learning about r and lvalues and I think i am following the basic concept, but on the site I am learning from there is a piece of code that I am a bit confused with.
Where I am confused is where is says, p + 1 is an rvalue, but *(p + 1) is an lvalue, why is this? Is it because I can not assign to p + 1. Because p + 1 technically has a place in memory, or is it because when you do p + 1 that isnt saved anywhere in memory, but then neither is *(p + 1)
1 2 3
int arr[] = {1, 2};
int* p = &arr[0];
*(p + 1) = 10; // OK: p + 1 is an rvalue, but *(p + 1) is an lvalue