Wikipedia wrote: |
---|
Lvalues are values that have addresses being programmatically accessible |
This describes a concept through one of its properties. Lvalue is an expression that evaluates to the identity of a non-temporary object. One of its properties is that its address may be taken.
hamsterman wrote: |
---|
to store an lvalue, means to store an address. |
Yes, if you want to *store* an lvalue in some containing object, you would have to obtain its address (which is an rvalue) and assign that address to that containing object (which has to have a suitable pointer type). Which is why I always say "
pointer holds a reference" (or doesn't, if it's nullable).
That makes pointers a requirement in many programming tasks, e.g. the design of trees, lists, and other data structures.
But since C++ (unlike C) supports pass-by-reference and since C++ (also unlike C) allows binding of additional names to objects, many other programming tasks do not require address juggling. Of course they can be done by chaining address-of/assign to pointer/copy pointer/dereference and, if written well, will compile to identical machine code, using pointers introduces unnecessary semantic complexity to something the language offers directly.