Like
3 = myVariable;
Will generate an lvalue error, because you can't assign to a numeric constant.
You can't assign to a function, or assign to an array either.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
@joshilay
I don't think you get rvalue required errors.
Maybe he just wanted to know the difference between the L and R values ?
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
hi ...
can anyone please tell what are Lvalue and Rvalue errors in c and c++ ???
Lvalue means location value. And Rvalue means read value.
Suppose the code is
int i;
i=5;
here i is lvalue and 5 is Rvalue.
the code 5=i;
generates error lvalue required.
himanjim
Junior Poster in Training
67 posts since Jul 2006
Reputation Points: 14
Solved Threads: 1