previous | start | next

Overloading operator<<: 2

We can't define new members of the ostream class.

And we can't make operator<< be a member of the Employee class.

So as for the Fraction class we can define a non-member overloaded operator<<

 ostream& operator<<(ostream& os, const Employee& e); 
     


previous | start | next