I have (hopefully) loaded the dictionary correctly, but I'm not clear on how to identify its location in memory without changing the declaration of the load function?
More concretely, in my code for load, I have this:
node* hashtable[26]
(My first pass at this hashes on the first letter -- I'm not optimizing.)
I would think I need to return something like &hashtable
, along with true
or false
, but we are told not to alter function declarations.
This makes me wonder if I should declare it as some sort of global variable in my .c
or .h
file, but I'm not sure how to do that. Can we do something like:
#define node* hashtable[26]
...at the top of the file? I tried, and it didn't work.