Spell Checker

Hello, For c++ I have a homework question that I need help on please.. I DO NOT want the full code, I would just like it if someone could explain to me the steps I should use to write my OWN. I have been trying to figure out how to get started and what my steps should be, however I am lost. I will post my homework question..Please explain to me what I should do, again I am not asking for the full code. This may seem easy to some but for me it is difficult seen as I am in an online class and I get hardly any help. Thank you.

Homework:
Determine if a word entered by the user is spelled correctly. A word is considered correct if it's found in dict.txt.

1) read word.
2) open file dict.txt
3) start reading words from file one by one, comparing your word with them.
3a) If thy match, then word is spelled correctly.
4) If you read whole file and did not find matching word, then it is spelled incorrectly.
If you are checking a bunch of words and the "dictionary" isn't too large you could read everything into a std::set<std::string> and then use the find method.

http://www.cplusplus.com/reference/set/set/
http://www.cplusplus.com/reference/set/set/find/

The method I mentioned is an alternative if you choose to not use brute force. However, for this assignment using MiiNiPaa's method (brute force) may be the best.
Thank you..I will try to follow the steps then I will upload my code...Also, i need to suggest words if the word is misspelled..what should I use to go about doing that part?
calculate Levenshtein distance between your word and other words and suggest ones with least distance.
Topic archived. No new replies allowed.