grouping

In assignments when the tutorial(cplusplus) states the, right-to-left rule, is it implying the lvalue is added to the rvalue or vice versa?
Last edited on
is it implying the lvalue is added to the rvalue or vice versa?

That works on assignment, not on addition.
The lvalue gets changed:
x = 8 assigns 8 to x
8 = x gives compiler error, you can't assign x to 8 ( 8 is an rvalue )
Thanks,

So with asssignments the grouping is, r-l(right to left). But with other operators the rule is modified. Taking the grouping r-l or l-r.
'rvalue' and 'lvalue' have sense only with the = operator, with most other operators the order of the operands doesn't matter much
Topic archived. No new replies allowed.