I keep getting an error (will mark where below) and I'm not sure what is going on here. We have been introduced to overloading an output operator and I am not sure on the syntax of how to do this it seems. By the way, we are also working with templates. Here is my header file:
operator<< is a binary function, meaning it takes two arguments. In order for it to work properly as the insertion operator, the first argument must be an ostream type. If you removed the ostream& portion, I'm sure you'll find that output doesn't actually work.
When a function is defined as a member of a class, the first argument is always the this argument which is a pointer to the object the function was called on, therefore operator<< should not be defined as a member function when it is being used to implement the insertion operation on a stream. It should be defined as a non-member function.