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 / EX6.CPP < prev    next >
C/C++ Source or Header  |  1992-02-18  |  668b  |  26 lines

  1. // Borland C++ - (C) Copyright 1991 by Borland International
  2.  
  3. // ex6.cpp:   Using the Dictionary class
  4. // from Hands-on C++
  5. #include <iostream.h>
  6. #include "diction.h"
  7.  
  8. main()
  9. {
  10.    Dictionary d(5);
  11.    char *word = "class";
  12.    char *indef[4] =
  13.      {"a body of students meeting together to study the same",
  14.       "subject a group sharing the same economic status",
  15.       "a group, set or kind sharing the same attributes",
  16.       0};
  17.    char *outdef[4];
  18.  
  19.    d.add_def(word,indef);
  20.    cout << word << ":\n\n";
  21.    int ndef = d.get_def(word,outdef);
  22.    for (int i = 0; i < ndef; ++i)
  23.       cout << (i+1) << ": " << outdef[i] << "\n";
  24.    return 0;
  25. }
  26.