cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
grouping
grouping
Nov 23, 2009 at 4:31pm UTC
ArcherSam
(20)
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
Nov 23, 2009 at 4:31pm UTC
Nov 23, 2009 at 5:27pm UTC
Bazzy
(6281)
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 )
Nov 23, 2009 at 5:38pm UTC
ArcherSam
(20)
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.
Nov 23, 2009 at 7:08pm UTC
Bazzy
(6281)
'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.