0
increment operator
Cam someone explain me what does this "+=" do ?
4 Respuestas
+ 2
It's equivalent to adding the current value of whatevers on the left side of the equal sign by whatever is on the right side of the equal sign.
Example/
int x = 5;
x += 10;
This is equivalent to writing:
int x = 5;
x = x + (10);
So x will become 15 in both cases.
+ 2
x+=y means x=x+y;
x-=y means x=x-y;
x*=y means x=x*y;
x/=y means x=x/y;
+ 2
you're welcome
+ 1
tanks