既然如此, 我应该能够通过某种类型的权利? 为什么编辑者给我留下错误?
int cmp_func(void *, void *));
typedef struct word_{
char key[WORD_SIZE];
int *frequency;
} word;
Phash_table new_hash(int size, int (*hash_func)(char *), int (*cmp_func)(void *
, void *));
int comp_function(struct word_ *word1,struct word_ *word2){
if( word1->frequency < word2->frequency){
return -1;
}
if(word1->frequency < word2->frequency){
return 1;
}
if(word1->frequency == word2->frequency){
return 0;
}
}
project4_functions.c:47:3: warning: passing argument 3 of new_hash from incompatible pointer type [enabled by default]
hash.h:38:13: note: expected int (*)(void *, void *) but argument is of type int (*)(struct word_ *, struct word_ *)