Question

Feb 15, 2015 at 6:35am
Hi,

What is lvalue in C++ ?

Thanks.
Feb 15, 2015 at 6:46am
it's an expression (not to be confused with a variable), which designates an object. A simple way to tell if something is an lvalue is if you can take its address (this only fails for bit field lvalues, whose addresses cannot be taken)

see http://en.cppreference.com/w/cpp/language/value_category for detail
Last edited on Feb 15, 2015 at 6:47am
Feb 15, 2015 at 7:01am
Got it, thanks.
Topic archived. No new replies allowed.