【发布时间】:2017-12-12 17:21:22
【问题描述】:
我正在尝试将持有 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是什么?
标签: c pointers struct linked-list