#include using namespace std; #include "dictionary.h" #include "dice.h" Dictionary::Dictionary () { // nothing to be done } void Dictionary::LoadWords (const string& filename) // pre: filename refers to a valid file that contains a list of words // post: words from file are stored in a list { ifstream input(filename.c_str()); if (input.good()) { // TODO: add code to read words from file into StringSet } else { cout << "Error: Unable to open file " << filename << endl; } } bool Dictionary::Contains (const string& word) const // post: returns true word is in list of possibles, // false otherwise { // TODO: add code to check if word is in StringSet return false; } string Dictionary::GetSecretWord () const // post: returns random word from list of possibles { Dice d(myWords.size()); // TODO: add code to get random word from StringSet return ""; }