0

At first, my code accidentally didn't support full 45 chars of a possible word. And so returned the following:

:( handles max length (45-char) words \ expected output, but not "\nMISSPELLED WORDS\n\npneumonoultramicr..."** 

That one's kinda obvious. Dictionary just couldn't load the word, hence the error. So I quickly fixed it, but then...

:( handles max length (45-char) words \ expected output, but not "\nMISSPELLED WORDS\n\n\nWORDS MISSPELLE..."** 

So, it seems that it wanted a misspelled word? Could someone enlighten me as to what is going on here?

1 Answer 1

4

Okay, if anyone else is struggling with this, here's what you may do.

  1. Underneath each check there is a link. Open it in whatever you have to see an extended report about what went wrong.

Example: https://sandbox.cs50.net/checks/95e99d15e57c4df581186cfbf4ef5447

  1. And now to the problem at hand - it seems that my code, if it encountered a word longer than 45 chars in the dictionary, instead of only saving first 45 chars and moving on, saved the whole word in 2 segments, which was wrong. So if you're having similar to the one I had, this may be the cause.
1
  • When you created your buffer, did you remember to allow for one extra character for the string terminator at the end? Commented Jun 22, 2015 at 6:49

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.