For example, could it go in dictionary.h? It seems like that would make the overall structure clearer, but I'm basically just lost.

I plan to begin with a trivial hash function to make debugging easier, and then to experiment with a little more complexity. So I'd like to isolate the hash function if that's possible


Putting actual code into a .h header file is something that should never be done. Any hash function, or any function for that matter, should be in a .c file. In this case, you should be putting your hash function in the dictionary.c file, mostly because it will need to be there to pass check50. Remember to place the function prototype (or the function itself) in the file ahead of any calls to that function.

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


I was going to put it at the beginning of "load" but it seemed awkward.

You must log in to answer this question.

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