title: C++ operator== overloading
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4421706/operator-overloading">Operator overloading</a>  </p>
  </blockquote>
  
  
  
  <p>What is the differences between the following ways to overload operator== ?</p>
  
  <pre><code>// stroustrup way
  friend bool operator== (MyClass &amp;lhs, MyClass &amp;rhs); 
  </code></pre>
  
  <p>and </p>
  
  <pre><code>// as taught in other places, including caltech
  bool MyClass::operator== (MyClass &amp;rhs);
  </code></pre>
  
  <p>Which way is better?</p>