-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathEX5.CPP
More file actions
25 lines (21 loc) · 699 Bytes
/
EX5.CPP
File metadata and controls
25 lines (21 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Borland C++ - (C) Copyright 1991 by Borland International
// ex5.cpp: Using the Definition class
// from Hands-on C++
#include <iostream.h>
#include "def.h"
main()
{
Definition d; // Declare a Definition object
char s[81];
// Assign the meanings
d.put_word("class");
d.add_meaning("a body of students meeting together to \
study the same subject");
d.add_meaning("a group sharing the same economic status");
d.add_meaning("a group, set or kind sharing the same attributes");
// Print them
cout << d.get_word(s) << ":\n\n";
for (int i = 0; d.get_meaning(i,s) != 0; ++i)
cout << (i+1) << ": " << s << "\n";
return 0;
}