954,505 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Lvalue and Rvalue error ...

hi ...
can anyone please tell what are Lvalue and Rvalue errors in c and c++ ???

joshilay
Light Poster
31 posts since Jul 2006
Reputation Points: 10
Solved Threads: 0
 

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
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

Yes what Mr. Salem has said is perfect and if you want a more detailed account then you can try here.

http://msdn2.microsoft.com/en-us/library/bkbs2cds.aspx

Hope it helped, bye.

~s.o.s~
Failure as a human
Administrator
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
 

@joshilay
I don't think you get rvalue required errors.

Grunt
Junior Poster
152 posts since Jul 2006
Reputation Points: 197
Solved Threads: 12
 
@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
Administrator
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
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You