bool load(const char *dictionary)
{
char splitStrings[9999][45];
FILE* dict = fopen(dictionary, "r");
node* item = table[0];
int i = 0;
for (i = 0; fscanf(dict, "%s", splitStrings[i]) != EOF; i++)
{
strcpy(item -> word, splitStrings[i]);
item = item -> next;
}
return true;
}
my code adds all words to table[0] (i know it's not efficient) but when i try to use strcpy to add the word, i get a SIGSEGV / segmentation fault / core dump. i cant figure out the problem.