/* * dict.hpp * * Created on: Oct 18, 2010 * Author: mike * for use in Yale course CPSC 427a, Fall 2010 */ #pragma once #include "word.hpp" #include "wordlist.hpp" #include "wordentry.hpp" class Dictionary { public: WordList wl[MAXLEN + 1]; public: void readDict(const char *fname); WordEntry* add(const Word& word); const WordList& getWordList(int k) const { return wl[k]; } ostream& print(ostream& out) const; }; //------------------------------------------------------------------- inline ostream& operator<<(ostream& out, const Dictionary& dict) { return dict.print(out); }