So close to submission! - However, when I check using valgrind the ouptut is:
==22743== Invalid read of size 8
==22743== at 0x40135C: unload (dictionary.c:123)
==22743== by 0x400E59: main (speller.c:152)
Looks like you're trying to access 8 bytes of memory that isn't yours? Did you try to index into an array beyond its bounds? Take a closer look at line 123 of dictionary.c.
I feel like it's to do with cursor2= cursor ->next
Would appreciate any thoughts :)
EDITED: removed code after input given
hash[a]
does not have a "next", so on the first iteration of the for loop, the violation comes herecursor2= cursor2->next
. Any number of ways to correct it; so back to the drawing board :)