I don't completely understand global operator functions. I know that we need them so operations like 5*class_name can work, but is that it? Can we use them on multiple classes?
Since I'm on the topic of operator functions, I have one more question. I saw this example, and all of it makes sense to me except for why there is an & before operator.
You're returning a reference to the ostream object, this is instead of making a copy of the object for the function, which is the only way to pass objects around.
There is no difference as far as the compiler is concerned. I put the reference with the type because that's what the type is; the operator isn't a reference, and neither is the variable name.
I think ostream &operator could cause more confusion than ostream& operator. Maybe just me?