if any body knows please send the information about L value required error in c++. if anybody knows please send it to <email snipped>
3 = x
Is an error because 3 cannot be an L-value
x = 3
is OK, because x can be an L-value.
A no can not be a variable
bt a variable can be a no thasts the reason for error
An lvalue is defined as something that can appear on the left-hand-side of an assignment (like
a = b; ). Basically, it needs to be a variable with a name, i.e., not a temporary or constant value (like
5 ). Certain operations, like the assignment operator, require that the variable you use it with be an lvalue, and thus, the error "lvalue required". The other kind of variables, called rvalues (which can appear only in the right-hand-side of an assignment), cannot be converted to lvalues, so if you feed an rvalue to a function or operation that requires an lvalue, you get the "lvalue required" error.
Post the code that is giving you trouble and then we can give more concrete help.
Last Activity: Nov 26th, 2007
The OP doesn't need help anymore.