home *** CD-ROM | disk | FTP | other *** search
- // \EXAMPLES\EX10013.H
- //--------------------------------------------------------------
- // definition of the PhoneBk class
- //--------------------------------------------------------------
-
- // files in this example:
- // %F,15,EX10011.H%EX10011.H definition of the class String
- // %F,15,EX10012.H%EX10012.H definition of the classes
- // PhoneNum, List and ListIter
- // EX10013.H this file
- // %F,15,EX10011.CPP%EX10011.CPP member functions of the class String
- // %F,15,EX10012.CPP%EX10012.CPP member functions of the classes
- // PhoneNum, List, and ListIter
- // %F,15,EX10013.CPP%EX10013.CPP member funtions of the class PhoneBk
- // %F,15,EX1001.CPP%EX1001.CPP main() to exercise this class
-
- #ifndef PHONEBK_H
- #define PHONEBK_H
-
- #include "EX10012.H"
-
- //--------------------------------------------------------------
- // Definition of the class PhoneBk
- //--------------------------------------------------------------
-
- class PhoneBk {
- List list;
- public:
- PhoneBk (){}; // default constructor
- PhoneBk ( const PhoneBk& oldbook); // copy constructor
- ~PhoneBk () {}; // destructor
- int insert( char* who, long telnum); // insert or change entry
- int remove( char* who); // remove entry for name
- long lookup(char* who); // look up number for name
- ostream& print(ostream& os); // print the phonebook
- };
-
- #endif
-