Index:
[thread]
[date]
[subject]
[author]
From: Tim Bain <tpb2@duke.edu>
To :
Date: Sat, 30 Jan 1999 10:50:52 -0500
++ and -- operators
I have a question about the ++ and -- operators; in C++, these
add/subtract 1 from a variable, and store that new value in the
variable. However, in the examples on pg. 2 of the assignment,
the example for ++ says "++(a + b * c)". Obviously, this example
shows ++ working on an expression rather than a single variable,
and so storing a new value would be impossible. So, should we
implement ++ and -- so that they just add/subtract 1 from any
expression, or should we have them add/subtract 1 from a variable
and store the result as the new value of the variable?
Thanks.
Tim Bain
Index:
[thread]
[date]
[subject]
[author]