I'm trying to write a program to act as a spellchecker. I have dictionary file (attached) which i'm trying to scan into an array to be stored, and then scan through another file and compare these words to the array. At the moment, i'm stuck on copying the buffer array i have with the dictionary words in into the dictionary array. I get segmentation faults (using unix). The only thing i can think is wrong is taht i think the program is scanning in \n at teh end of each word, but i'm not sure. The code is below...
Any ideas on how to get this working would be great, and quick responses if pos as this is in tomorrow! (i got held up on another prog involving matrices!).
/*void de_allocate(char* dict_store, int dict_words)
for (i=0; i<=dict_words; i++)
int dict_words=0, word_length,i;
printf("File open failed\n");
dict_store = (char*)malloc(word_length*sizeof(char));printf("test 3\n");
for(i=0;i<=dict_words; i++)printf("test 4, dict_words=%d,i=%d\n",dict_words,i);