I'm really struggling with this one! I've just about got through to the last section I have to complete and I have two issues that I know of (I can't get 'check' to work so I don't know if 'load' is working properly really - even though 'size' is working fine so I'm hoping!) The first problem is that I couldn't pass the char 'word' provided by speller into my hash function because it is a const char * and my function needs a char * (my error said "passing const char * to parameter of type 'char *' discards qualifiers")?
So, I just duplicated the hash function (djb) & changed the value to a const char * thinking that would work - now I'm getting a segfault... So how do I pass word into my hash function to get the array location? The walkthrough didn't mention this issue!!
I'm also getting valgrind errors saying I have an uninitialised value at line 174...I've tried to make sure 'value' is initialised even though I don't know if that's what was needed but it still says the same - I can't see what else I can do with 'hashtable' so I'm stuck!!!
I would really appreciate any pointers....(LOL!) thank you!! :-)
The code is here: http://pastebin.com/Rm5XTAvL