home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c081_11 / 6.ddi / EXAMPLES.ZIP / EX6.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-13  |  660 b   |  26 lines

  1. // Borland C++ - (C) Copyright 1991 by Borland International
  2.  
  3. // ex6.cpp:   Using the Dictionary class
  4. // from Getting Started
  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. }
  25. 
  26.