result += a +b in c++ meaning

result += a + b;
  1. a + b: Adds the values of variables a and b.
  2. result += a + b: Adds the result of step 1 to the current value of the variable result and assigns the sum back to result.