title: Overloading == operator C++
body: <p>i did an overloading of the + operator but now i wanna do overloading of == operator of 2 lengths (may or may not be the same length) and return the respective results. How do i do it? Do i need to use bool for ==?</p>
  
  <p>//what i did for overloading + operator to get new length out of 2 different lengths</p>
  
  <pre><code>Length operator+ (const Length&amp; lengthA){       
  
      int newlengthMin = min, newlengthMax = max;
  
      if (lengthA.min &lt; min)
          newLengthMin = lengthA.min;
      if  (lengthA.max &gt; max)
          newLengthMax = lengthA.max;
  
      return Length(newLengthMin, newLengthMax);
  }
  </code></pre>