You can define the streaming operator either to be a member of the class, in which case, it only takes 1 argument, or as a free function, in which case it takes 2 arguments.
What you've tried to do is define it as a class member, but to still take 2 arguments.