Do we need to provide an additional operator<< for files?
That is, do we need both of these:
1. ostream& operator<<(ostream& os, const Employee& e); 2. ofstream& operator<<(ofstream& os, const Employee& e);
The ofstream class inherits from ostream.
This means that all the operations that are valid for cout are valid for any ofstream.
An ofstream has some additional properties and operations, but any code that uses an ostream will only use operations that will also work if an ofstream is substituted for the ostream.
So an ofstream can be passed as the first parameter to version 1 and version 2 is not needed.