Code:
typedef struct {
char word[101];
int freq;
} WordArray;
static WordArray *words[10000];
That is an array of pointers to structures. You don't actually have any structures allocated. But if you did, it would compare something like this:
Code:
if( strcmp( words[ x ]->word, words[ y ]->word ) == 0 )
... they are the same
If you made that an array of structures instead of pointers to structures, then it would be:
Code:
if( strcmp( words[ x ].word, words[ y ].word ) == 0 )
... they are the same
Both of those assume you have actually copied something into 'word':
Code:
strcpy( words[ x ]->word, "hello" );
strcpy( words[ y ]->word, "world" );
Quzah.