title: Overloading binary operator> in a derived class in c++
body: <p>I have searched far and wide for a specific answer to this question, and cannot find it. I am trying to create a base class with a virtual operator> that I can override in the derived class. Currently I'm having problems because declaring the function only requires one input variable (as in "bool operator> (Derived &amp; a)" but attempting to define it in a cpp file tells me that it requires two inputs (as in "bool operator> (Derived &amp; a, Derived &amp; b))</p>
  
  <p>I've tried defining the operator inline, but then I get errors where it thinks the derived class is still abstract because I'm passing in the derived type to the operator as shown above, instead of the base class. But if I pass the base class, then I cannot access the derived member variables I need to make the comparison.</p>
  
  <p>I think I'm missing something simple here but I cannot seem to figure out what it is.</p>
  
  <p>Hopefully you can help. 
  Thanks</p>