|
Let put things easier. If we do assignment like x = y. I know we should put r(y) in l(x), as we discussed in the class. But if we want to do *x = y. There are two possible ways to do this: put r(y) in the l(*x) or put l(y) in the l(x) Somebody help me out why the second is wrong:( It's my understanding that you can't put l(y) into l(x) because you can't store an lvalue directly into another location. You can store an rvalue, however, so you need to get r(y). I'm not sure why you want to store the value in l(x) in the second case instead of in l(*x) though. Having *x on the left side of the assignment means that you want to store the rvalue of y in the lvalue which is the rvalue of x. I think. I found a webpage that has a decent demonstration on the meaning of dereferencing, but I am not at home. I will post it in a couple of hours if you want to look there. I didn't really get it until I looked at their explanation. Jake Bartolone |
Re: lvalue vs rvalue by Sam TH, 2000, Nov 08
I am not convinced by Zhenglong Gu, 2000, Nov 08
think about what a pointer means?? by Michael C. Brizic, 2000, Nov 08
You didn't understand me by Torkiat Krutpum, 2000, Nov 09
to: