/* File: dict.h This interface exports functions for defining and looking up words in a dictionary. The dictionary is maintained by the implementation. */ #ifndef _dict_h #define _dict_h /* This function initializes the dictionary to be empty and must be called before any of the other operations are used. */ void InitDictionary(void); /* This function associates the word with an integer. Any previous definition for the word is lost. If defining the word would exceed the capacity of the dictionary, an error is generated. */ void Define(char *word, int value); /* This function looks up the word in the dictionary and returns its associated integer value. If the word has not been defined, this function returns -1. */ int Lookup(char *word); /* This function prints the contents of the dictionary. */ void PrintDictionary(); #endif