title: += Operator in C++
body: <p>Someone please tell me the difference between the following codes which add two variables of datatype <code>int</code>. I want to know which one is better.</p>
  
  <p><strong>Code A:</strong></p>
  
  <pre><code>sum = sum + value;
  </code></pre>
  
  <p><strong>Code B:</strong></p>
  
  <pre><code>sum += value;
  </code></pre>
  
  <p>We usually prefer <code>++</code> operator over <code>+= 1</code>. Is there any specific reason behind that as well ?</p>
  
  <p><strong>I want to know the difference between the above codes with respect to the conventions or efficiency level. Which one is recommended ?</strong></p>