I'm having some issues debugging my program from Problem Set 5: Mispellings.
Well after struggling a couple of hours, here's some background:
1. My check
function seems to work just fine, as well
as the load
and unload
. When I execute diff -y student.txt staff.txt
at the command line, all the fields from my output are the same as the staff's output (except TIME IN TOTAL). Everything else matches perfectly (WORDS MISSPELLED, WORDS IN DICTIONARY, WORDS IN TEXT).
The issue is when I run check50 on my program, check50 fails entirely. But if I declare the global variable that counts the number of words in my dictionary like int number_words = -1;
check50 passes "perfectly", even though declaring it as an <int>
instead of as a unsigned int
seems to be a bad idea. If you would like you can take a look at my code at: ("...when asking for help, you may show your code to others, but you may not view theirs...").
Thanks for you time. Greetings.