Overloading << (ctd.)
The function returns an ostream, because this permits the “chaining” of output statements, as in:
cout << “The points are “ << p << “ and “ << q << endl;
The implementation is in point.cxx in newpoint project.
Previous slide
Next slide
Back to first slide
View graphic version