for(p=head,q=p->next;q>name!=a&&q->next!=NULL;)
[Error] ISO C++ forbids comparison between pointer and integer [-fpermissive]
这个怎么改啊
for(p=head,q=p->next;q>name!=a&&q->next!=NULL;)
[Error] ISO C++ forbids comparison between pointer and integer [-fpermissive]
这个怎么改啊
for(p=head,q=p->next;(q->name!=a)&&(q->next!=NULL)) 括起来试试。 字符数组的比较用strcmp(a,b)实现,需要头文件:#include <string.h>