By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
 455,514 Members | 1,741 Online
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,514 IT Pros & Developers. It's quick & easy.

# lvalue?

 P: n/a Sometimes we get an error of lvalue requred?What exactly is the lvalue? And when this error occures? May 27 '07 #1
Share this Question
4 Replies

 P: n/a In article <11**********************@n15g2000prd.googlegroups .com>, Shraddha Sometimes we get an error of lvalue requred?What exactly is the lvalue?And when this error occures? What did you come up with when you googled for lvalue ? -- There are some ideas so wrong that only a very intelligent person could believe in them. -- George Orwell May 27 '07 #2

 P: n/a Shraddha

 P: n/a Ben Pfaff wrote: Shraddha Sometimes we get an error of lvalue requred?What exactly is the lvalue? Informally speaking, an lvalue is an expression that can appear on the left side of an assignment operator. Generally, an lvalue is an expression that designates an object (a region of memory): a variable, a dereferenced pointer, etc. In fact in C the definition of an lvalue is different from what this informal idea would suggest, but this is a reasonable place to start thinking about them. And there's plenty of stuff in the archives on this topic, some of it more off-topic (but historically interesting) than others. [You get an "lvalue required" message when you are supposed to have an lvalue but you didn't supply one; a typical example would be assigning to an array or something++.] -- Double Plus Good Hedgehog The "good old days" used to be much better. May 27 '07 #4

 P: n/a Shraddha wrote: Sometimes we get an error of lvalue requred?What exactly is the lvalue? And when this error occures? This is a FAQ, check Question 20.39b. Let say i is a int, then consider the assignment i = i + 1; here the r.h.s "i" is an int value, while the identifier "i" on the l.h.s. refers to something very different, namely a memory location. Hence, l-value is the value of "i" on the l.h.s of the assignment, while r-value refer to the value of the identifier on the r.h.s. -- Tor May 27 '07 #5

### This discussion thread is closed

Replies have been disabled for this discussion.