What does += do?

I know that for example iA++ is iA = iA + 1, but what does += do?

@mancigol

but what does += do?


That just means, iA = iA + whatever the variable value is.
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
x += y is equivalent to x = x + y
Topic archived. No new replies allowed.