title: == operator overloading with struct
body: <p>I'm trying to define an == operator within a struct, like this:</p>
  
  <pre><code>struct names {
      string fname;
      string lname;
  bool operator==(names a, names b) {
      return (a.fname == b.lname);
  }
  };
  </code></pre>
  
  <p>However, the compiler says:</p>
  
  <blockquote>
  ..\src\trash.cpp:10:33: error: 'bool names::operator==(names, names)' must take exactly one argument
  </blockquote>
  
  <p>Why is this?</p>