0

I've managed to compile my pset5 code, but when trying to run the program I keep getting "Could not load dictionaries/large" (or /small depending on what I entered at command line).

I have checked that the dictionaries large & small are in the current directory from where I try to run the program (workspace/pset5/speller). To be specific, I have entered the following commands: ./speller dictionaries/small texts/cat.txt ./speller dictionaries/large texts/cat.txt ./speller texts/cat.txt I would get the same "Could not load dictionaries" error for all.

Please see a screenshot:

enter image description here

Does anyone know what I'm doing wrong?

1 Answer 1

0

It doesn't say that it couldn't OPEN the dictionary, it couldn't LOAD the dictionary. If you examine the code in speller.c that calls load(), you can see that it means that the load function returned FALSE.

That's a problem with code in the load function, not in finding the dictionary file. You'll need to go back and debug the function.

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

1
  • Got it, thanks :-) Commented Jun 21, 2018 at 22:38

You must log in to answer this question.

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