Operator Overloading C++; too many parameters for << operation
You are overloading << operator as a member function, therefore, the first parameter is implicitly the calling object. You should either overload it as friend function or as a free function. For example: overloading as friend function. However, the canonical way is to overload it as free function. You can find very good information from this post: C++ operator overloading