title: operator overloading c++
body: <p>I am trying to preform  operator overloading in C++;
  for some reason the compiles keeps on giving me the error</p>
  
  <blockquote>
    <p>error: ‘bool Matrix::operator==(const Matrix&amp;, const Matrix&amp;)’ must take exactly one argument</p>
  </blockquote>
  
  <p>Now, I know that there is some way to to it with one argument using this, but I understood that by using friend I can do it this way, but it still is not working.</p>
  
  <p>Here is my code,</p>
  
  <p>Thanks in advance.</p>
  
  <pre><code>class Matrix{
  public:
   Matrix();
   friend bool operator==(Matrix &amp;mtrx1,Matrix &amp;mtrx2);
   friend bool operator!=(Matrix &amp;mtrx1,Matrix &amp;mtrx2);
  
  protected:
   std::vector&lt;Cell&gt; _matrix;
   int _row;
   int _col;
  
  };
  
  inline bool Matrix::operator==(const Matrix&amp; mtrx1, const Matrix&amp; mtrx2){
  
  /* .......... */
  }
  </code></pre>