previous | start | next

Overloading operator<<: 5

Using the public interface of Employee in writing operator<< works, but there are more flexible choices.

The first choice has superior benefits for opertor<< in case subclasses of Employee are created later (such as a Manager subclass).



previous | start | next