Error Checking in C++

Mar 13, 2013 at 8:24pm
I'm writing a program that reads a text file then 'printf's it out in the console which is fine, but I also need to check to see if the text file has any errors, spelling mistakes if you will. How do I do this? Do I set up an array of the correct terms and use strcomp to check they are correct? Any help would be great cheers.
Mar 14, 2013 at 12:24am
Show us your initial code please (and please use code tags for formatting using this little button marked "<>" at the right side of the editor field of this page.)
Mar 14, 2013 at 12:30am
Um, I think you would have to include a whole dictionary in your program or get another .txt file, get your word, go to your .txt file, remember to include most common spelling errors in the other .txt file, do strcomp. Then use that to check
Mar 14, 2013 at 12:58am
closed account (18hRX9L8)
I have a dictionary file if you need one. Yes, using strcmp is best. What you do is get the word, check it with the dictionary and then print if the word is spelled incorrectly (if the word is not found in the dictionary).
Last edited on Mar 14, 2013 at 12:59am
Topic archived. No new replies allowed.