I'm having trouble overloading the output operator <<
When I try and compile my code it says there are too many perameters for the operator.
My code is something like this:
ostream& operator <<(ostream&, myclass&);
I can't remember the code exactly as I'm on a different computer to my own but I think it was similar to the above (I got it from C++ Primer Plus).
Can anyone tell me what's wrong or give me an example that works?