- April 12, 2010 at 4:22 pm #2246
plz anyone can tell me……how can we produce an error like lvalue and rvalue required.
basically lvalue stands for left value and rvalue for right value.
but i am unable to bring these errors in my programs….
- April 12, 2010 at 10:11 pm #3648GWILouisaxwzklaParticipant
An L-value violation is easy , just put a constant on the left hand side of an equation:
const int myInt = 9;
myInt = 3; // need an L-value here
You need something that is assignable for a L-value. R-value violations are tougher , I’ll have to look into this…….
- April 13, 2010 at 7:10 pm #3649
so u have changed ur name from cman to dman…..
actually i know about LVALUE concept,but i m still alien about RVALUE.
please find it somewhere and reply…..
also i have posted a problem for “program without header files”…please reply on that too.
thanks for replying.
- April 13, 2010 at 7:52 pm #3650GWILouisaxwzklaParticipant
For an R-value violation you could do this:
void func ( int i );
int i = func ( 3 );
pretty sure that would constitute a R-value violation…….
- April 14, 2010 at 7:34 am #3651
thank you for both the answers…..
i’ll try them.
- The forum ‘C Programming’ is closed to new topics and replies.