title: C++ -- How to overload operator+=?
body: <p>Given the following code snippet,</p>
  
  <pre><code>class Num
  {
  public:
      Num(int iNumber = 0) : m_iNumber(iNumber) {}
  
      Num operator+=(const Num&amp; rhs)
      {
          this-&gt;m_iNumber = (this-&gt;m_iNumber + rhs.m_iNumber);
          return *this;
      }
  private:
      int m_iNumber;
  };
  
  //===========================================================
  int _tmain(int argc, _TCHAR* argv[])
  {
      Num a(10);
  
      Num b(100);
  
      b += a;
  
      return 0;
  }
  </code></pre>
  
  <p>I would like to know how to correctly overload the <code>operator+=</code>.</p>
  
  <p>Questions:</p>
  
  <ol>
  <li><p>How to define the signature of this operator? Specially, what should be used for the return value?</p></li>
  <li><p>How to implement the function body?</p></li>
  <li><p>How to use this overload operator?</p></li>
  </ol>
  
  <p>I have provided a solution as above but I have concerns that it is not correct.</p>