Previous fileTop of DocumentContentsIndex pageNext file
Apache C++ Standard Library User's Guide

26.2 A Phone Number Class

An application that has to handle phone numbers will probably have a class that represents a phone number. We will also want to read and write telephone numbers via iostreams, and therefore define suitable extractor and inserter functions. For the sake of simplicity, we will focus on the inserter function in our example.

To begin, here is the complete class declaration for the telephone number class PhoneNumber:



Previous fileTop of DocumentContentsIndex pageNext file