char型のポインタを保持している構造体のフィールドとchar型のポインタを比較しようとしていますが、比較が機能していません。構造体とポインタを比較する方法
typedef struct node{
char * word;
struct node * next;
int occurrence;
}No;
aux = list;
while(aux != NULL){
if(aux->word == token)
{
new_node->occurrence = new_node->occurrence+1;
exist = 0;
}
aux = aux->next;
}
これより少しコードが必要です。 'list'とは何ですか? –