I was able to compile speller locally, but I keep failing check50. When I run my program I get the same output as the staff solution and it does not leak any memory. I have not altered speller.c or makefile, I have only changed dictionary.c and dictionary.h.

Check50 link: https://cs50.me/checks/e8b1019911c6ae894e39d2e14ed5ef322993593f

What does the exit code of 2 mean?

Any help would be greatly appreciated. Thanks in advance.

  • If you have entered a new header file in dictionary.h, the compilation may fail – MARS Aug 27 '18 at 20:35
  • I get the same result when I remove the new header file from dictionary.h and include it in dictionary.c. – user22258 Aug 27 '18 at 20:42
  • if you run make speller in the folder you are checking, it works fine? Any chance you've changed your dictionary.c file since you last compiled? – curiouskiwi Aug 27 '18 at 23:50
  • I have checked that the program compiles locally and works correctly before running the check50. I did not change my dictionary.c file before running the check50. – user22258 Aug 28 '18 at 0:07
  • Did you by chance change any of the function declarations in dictionary.h? (and change speller.c to make it work)? – curiouskiwi Aug 29 '18 at 2:12

Removing this code from my program seemed to make check50 work.

 // Check for upper case and convert to lower case

    if (isupper(word[0]))

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .