2

I am having some major difficulties with pset6.

I have gotten my program to work perfectly as far as I can tell. However when I try to run the program through check50, I get the following error messages:

:) dictionary.c, dictionary.h, Makefile exist
:) speller compiles
:( handles most basic words properly
    \ expected output, but not "\nMISSPELLED WORDS\n\nThe\nquick\nbrown..."
:( handles min length (1-char) words
    \ expected output, but not "\nMISSPELLED WORDS\n\na\n\nWORDS MISSPE..."
:( handles max length (45-char) words 
    \ expected output, but not "\nMISSPELLED WORDS\n\npneumonoultramicr..."
:( spell-checking is case-insensitive  
    \ expected output, but not "\nMISSPELLED WORDS\n\nfoo\nfoO\nfOo\nFo..."
:( handles possessives properly  
    \ expected output, but not "\nMISSPELLED WORDS\n\nfoo's\n\nWORDS MI..."
:( handles substrings properly
    \ expected output, but not "\nMISSPELLED WORDS\n\nca\ncat\ncats\nca..."

I'm not entirely sure how to go about fixing this. I can gather there's something wrong with how the output is being printed, but I haven't done any personal modifications that I know of that would cause this.

6
  • Just tried check50 and the server seems to be responding correctly (see sandbox.cs50.net/checks/52782c4af01d406dbcc6d0d0740ef344). Could you run the command again and paste the sandbox link that appears at the end? Commented Aug 10, 2014 at 15:38
  • Just ran your code on my sample dictionary and text file. It did not return the misspelt words correctly. Also run your code on ./speller ~cs50/pset6/texts/austinpowers.txt and compare it with the staff solution. Commented Aug 11, 2014 at 10:14
  • Ok, I identified one bug I hadn't noticed where the pointed to the first word loaded into each hash is forgotten. This produced minor discrepancies when comparing with the staff solution, but I've updated my code and now there is absolutely no difference between my output and the staff's (other than the time of course). @Luke Van In thanks for responding, here's the sandbox link: sandbox.cs50.net/checks/d81e280f10c8424d82d5a4cab634d938
    – Benno
    Commented Aug 11, 2014 at 13:27
  • Thank you both for replying. I figured out what was going wrong, my check function didn't check input with the last word in each hash, since it stopped when pntr->next = NULL. Anyways, thanks again, I very much appreciate it!
    – Benno
    Commented Aug 11, 2014 at 15:11
  • Sharing your source code publicly is a violation of the academic honesty policy; make sure to limit what you post in public to a short snippet, or it will be removed.
    – Air
    Commented Aug 11, 2014 at 16:04

1 Answer 1

3

Per a comment by the OP:

I figured out what was going wrong, my check function didn't check input with the last word in each hash, since it stopped when pntr->next = NULL.

You must log in to answer this question.

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