What does += do?

Feb 19, 2016 at 5:29am
I know that for example iA++ is iA = iA + 1, but what does += do?

Feb 19, 2016 at 5:38am
@mancigol

but what does += do?


That just means, iA = iA + whatever the variable value is.
Feb 19, 2016 at 6:10am
Hi,

There are a number of them, in this link near the end there is a list of all the common operators:

http://en.cppreference.com/w/cpp/language/operator_assignment
Feb 19, 2016 at 6:50am
x += y is equivalent to x = x + y
Topic archived. No new replies allowed.