See output chaining first. Generally, since << is left-associative, return X <<(ostream X, values)
... the left referenced ostream is returned and the next values in the chain added to it.
typically friends, and not members ? You need to provide a definition of the function where the first parameter passed is of type stream as the left-side operand is always of type stream, as in ...
cout << obj;
It cannot be a member function and you would typically make it a friend to allow access to the private data of the object you are wanting to output.