title: error C2804: binary 'operator +' has too many parameters (compiling with VC 120)
body: <p>Writing my own vector class (for a game engine) and overloading '+' operator in Visual Studio 2013 CPlusPlus project (using VC runtime 120), it is throwing me compiler error:</p>
  
  <blockquote>
    <p>Error: too many parameters for this operator function.</p>
  </blockquote>
  
  <p>Code snippet from <code>Vector.hpp</code> file below.</p>
  
  <p><strong>Vector.hpp</strong></p>
  
  <pre><code>class Vector
  {
  private:
      double i;
      double j;
      double k;
  public:
      Vector(double _i, double _j, double _k)
      {
          i = _i;
          j = _j;
          k = _k;
      }
  
      Vector&amp; operator+=(const Vector&amp; p1)
      {
          i += p1.i;
          j += p1.j;
          k += p1.k;
          return *this;
      }
  
      //Some other functionality...
  
      Vector operator+(const Vector&amp; p1, Vector&amp; p2) //Error is thrown here...
      {
          Vector temp(p1);
          return temp += p2;
      }
  };
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/3kOSV.png" rel="noreferrer"><img src="https://i.stack.imgur.com/3kOSV.png" alt="enter image description here"></a></p>
  
  <p>What am I doing wrong here? Don't want to make my operator overload non-member function.</p>