home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / OTHERUTI / TCPP30-3.ZIP / EXAMPLES.ZIP / DICTION.H < prev    next >
C/C++ Source or Header  |  1992-02-18  |  583b  |  23 lines

  1. // Borland C++ - (C) Copyright 1991 by Borland International
  2.  
  3. // diction.h:   The Dictionary class
  4. // from Hands-on C++
  5. #include "def.h"
  6.  
  7. const int Maxwords = 100;
  8.  
  9. class Dictionary
  10. {
  11.    Definition *words;       // An array of definitions; line 9
  12.    int nwords;
  13.  
  14.    int find_word(char *);   // line 12
  15.  
  16. public:
  17.    // The constructor is on the next line
  18.    Dictionary(int n = Maxwords)  {nwords = 0; words = new Definition[n];};
  19.    ~Dictionary() {delete words;};    // This is the destructor
  20.    void add_def(char *s, char **def); 
  21.     int get_def(char *, char **);
  22. };
  23.