overloading operator== complaining of 'must take exactly one argument'
<p>I am trying to overload the <code>operator==</code>, but the compiler is throwing the following error:</p>

<pre><code>‘bool Rationalnumber::operator==(Rationalnumber, Rationalnumber)’ must take exactly one argument
</code></pre>

<p>My short piece of code is as follows:</p>

<pre><code>bool Rationalnumber::operator==(Rationalnumber l, Rationalnumber r) {
  return l.numerator() * r.denominator() == l.denominator() * r.numerator();
}
</code></pre>

<p>Declaration:</p>

<pre><code>bool operator==( Rationalnumber l, Rationalnumber r );
</code></pre>

<p>Does anyone have any ideas why it's throwing the error?</p>
