   Operator
  What does the keyword operator do?Whats the difference between using that and a template function?Why do people use it for functions involving vectors?   I don''t have to do nothing but live and die, everything else i choose to do- I don''t know, but my dad says it alot 
  what does your documentation say? ;  The operator keyword is used to define/overload C++ operators for specific types. The following code defines a ''+'' operator for the class Vector3 Vector operator+( Vector const & a, Vector const & b ){    Vector3 c;    c.x = a.x + b.x;    c.y = a.y + b.y;    c.z = a.z + b.z;    return c;}   With the above function you can write the following code. Without the function, the compiler will complain that there is no ''+'' operator defined for the Vector3 class. Vector3 v1, v2, v3;v1 = v2 + v3;   I''m not sure how you would accomplish this with templates since the implementation of any operator is likely to be different for each class. ;  Operator overloading works just fine with templates; you''re just overloading, say, operator+ to work with any instances of the template type. In other words, you''re not overloading it to work with types foo and bar which are totally unrelated.F.E.X: template< unsigned int D_,typename R_ > Vector< D_,R_ > operator+(const Vector< D_,R_ > &l,const Vector< D_,R_ > &l){Vector< D_,R_ >  result;  // NB: assuming we have operator[] for component-wise access  for(unsigned int i = 0; i < D_; ++i)    result[i] = l[i] + r[i];  return (result);}Now we have an operator+ for our template Vector class, which itself allows for vectors of any non-negative dimension and any value type.Now, whether or not that''s actually USEFUL is another thing altogether, because I''VE never had the need for a 7-dimensional vector that uses chars as its value type... but you never know. 