
Provide a way to actually use the dictionary The code implementation would then go into a corresponding mydict.c file. What would be useful is for you to provide your own #include file, say, something like "mydict.h" with the following contents: #ifndef MYDICT_H It's not in what you've posted, but I'm inferring that your node is defined something like this: typedef struct nodeĪlso, your code refers to nwords which I'm assuming is defined like this: static unsigned nwords I see some problems that you'll probably want to address, and some other general comments that you may or may not want to use. otherwise made current node the first, shift rest over check if spot in table exists if not, start the linked list Hashkey = (hashkey*dword + dword + counter)%TABLESIZE find spot in hash table and put it in that bucketįor (int counter = 0 dword!= '\0' counter++) if there is a word, create node and put word in it initiate variable to store current wordĬhar* dword = calloc(LENGTH+ 1,sizeof(char)) It's part of a larger program, but I wanted general comments so I can clean it up further.


This loads a dictionary text file into memory to be used as part of a spell checker.
