home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / EXAMPLES / EX10013.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-25  |  1.5 KB  |  39 lines

  1. // \EXAMPLES\EX10013.H
  2. //--------------------------------------------------------------
  3. // definition of the PhoneBk class
  4. //--------------------------------------------------------------
  5.  
  6. //  files in this example:
  7. // %F,15,EX10011.H%EX10011.H       definition of the class String
  8. // %F,15,EX10012.H%EX10012.H       definition of the classes
  9. //                                 PhoneNum, List and ListIter
  10. // EX10013.H       this file
  11. // %F,15,EX10011.CPP%EX10011.CPP   member functions of the class String
  12. // %F,15,EX10012.CPP%EX10012.CPP   member functions of the classes
  13. //                                 PhoneNum, List, and ListIter
  14. // %F,15,EX10013.CPP%EX10013.CPP   member funtions of the class PhoneBk
  15. // %F,15,EX1001.CPP%EX1001.CPP      main() to exercise this class
  16.  
  17. #ifndef PHONEBK_H
  18. #define PHONEBK_H
  19.  
  20. #include "EX10012.H"
  21.  
  22. //--------------------------------------------------------------
  23. // Definition of the class PhoneBk
  24. //--------------------------------------------------------------
  25.  
  26. class PhoneBk {
  27.   List list;
  28. public:
  29.   PhoneBk (){};        // default constructor
  30.   PhoneBk ( const PhoneBk& oldbook); // copy constructor
  31.   ~PhoneBk () {};                    // destructor
  32.   int insert( char* who, long telnum); // insert or change entry
  33.   int remove( char* who);            // remove entry for name
  34.   long lookup(char* who);            // look up number for name
  35.   ostream& print(ostream& os);       // print the phonebook
  36. };
  37.  
  38. #endif
  39.