Linking causes the error: multiple definitions of operator<<(ostream&,MyClass&)
And I simple cannot understand why because it is not defined in the header file!
The obvious solution is to place the entire operator in the header file and declare it inline, but there must be some other way. What is the correct way of defining global overloaded operators?
Okay it seems I was having one of those days. It probably has something to do with not cleaning the old object files, but now it works and I am unable to recreate the error.