The program I'm trying to write is simple. The user enters a word and if it is the "dictionary" text file it says so. If not it outputs the two closest words on either side of the entered one. I have the basics I just don't know how to implement the diction.txt file or how to use the compare to get the close words. Thanks for your help in advance!
What has to be in the file? Words.
How do you read them?
How do you store them in memory?
How do you search them from your store?
Personally, I find it extremely revolting that one would be limited to what one already knows (although it might be useful for teaching purposes). If those are the rules, then thinking about the above questions might help.
So I talked to my teacher and she said use this http://imgur.com/XA6LZta to read in the words. I'm supposed to search through the txt file and compare the inputted word to all the words.
so I think I'm getting closer... I have this now. It quits if i say quit but if i enter a word it does nothing. so my wordsearch function is broken. i don't really understand ifstream still though and have no idea how to put the pointer back to the beginning