Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- rvalue



  Understanding lvalues and rvalues in C and C++

The terms lvalue and rvalue are not something one runs into often in C/C++ programming, but when one does, it’s usually not immediately clear what they mean. The most common place to run into these terms are in compiler error & warning messages. For example, compiling the following with gcc: int foo() {return 2;} int main() { foo() = 2; return 0; } You get: test.c: In function 'main': test.c:8:5: error: lvalue required as left operand of assignment True, this code ...

   lvalue,rvalue,C++,locator value,elaboration     2011-12-15 07:51:38