title: expected primary-expression before '!=' token
body: <p>I'm having a problem with two lines of code. The errors are: </p>
  
  <p>|line 4|error: expected constructor, destructor, or type conversion before '(' token|</p>
  
  <p>|line 50|error: expected primary-expression before '!=' token|</p>
  
  <p>Here are the code bits:</p>
  
  <pre><code>OPairType::OPairType (x=0, y=0);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>return != (lh.x == rh.x &amp;&amp; lh.y == rh.y);
  </code></pre>
  
  <p>If you need any more of the code, just leave a comment and I will supply it.
  Thank you for any help.</p>
  
  <p>Edit: 11/7/2013: Here is the header code:</p>
  
  <pre><code>class OPairType{
  private:
   int x;
   int y;
  public:
   OPairType (int=0, int=0);
   int getX() const;
   int getY() const;
   void setX(int);
   void setY(int);
   void setValues(int, int);
   friend OPairType operator + (OPairType, OPairType);
   friend OPairType operator - (OPairType, OPairType);
   friend bool operator == (OPairType, OPairType);
   friend bool operator != (OPairType, OPairType);
   friend std::ostream&amp; operator &lt;&lt; (std::ostream&amp;, OPairType);
  </code></pre>
  
  <p>And here is the .cpp code:</p>
  
  <pre><code>#include "OPairType.h"
  #include &lt;iostream&gt;
  
  OPairType::OPairType (int x, int y);
  
  int OPairType::getX() const {
   return x;
  }
  
  int OPairType::getY() const {
   return y;
  }
  
  void OPairType::setX(int new_x) {
   x = new_x;
  }
  
  void OPairType::setY(int new_y) {
   y = new_y;
  }
  
  void OPairType::setValues (int new_x, int new_y){
   x = new_x;
   y = new_y;
  }
  
  OPairType operator + (OPairType lh, OPairType rh){
  OPairType answer;
  
   answer.x = lh.x + rh.x;
   answer.y = lh.y + rh.y;
  
   return answer;
  }
  
  OPairType operator - (OPairType lh, OPairType rh){
  OPairType answer;
  
   answer.x = lh.x - rh.x;
   answer.y = lh.y - rh.y;
  
   return answer;
  }
  
  bool operator == (OPairType lh, OPairType rh){
   return lh.x == rh.x &amp;&amp; lh.y == rh.y;
  }
  
  bool operator != (OPairType lh, OPairType rh){
   return !(lh.x == rh.x &amp;&amp; lh.y == rh.y);
  }
  
  std::ostream&amp; operator &lt;&lt; (std::ostream&amp; out, OPairType c){
   out &lt;&lt; "(" &lt;&lt; c.x &lt;&lt; ", " &lt;&lt; c.y &lt;&lt; ")";
   return out;
  }
  </code></pre>