问题描述
问题陈述如下
{
ND *temp=start;
if(temp==NULL)
{
printf("LIST is empty");
return;
}
printf("\n list : \t" );
printf("%s",temp->data[0]);
while(temp->next!=NULL)
{
if(strcmp(temp->data[0],'b')==0)
{
printf(" %s ->",temp->data[size]);
}
temp = temp->next;
}
}
编译器显示警告 warning: passing argument 2 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion]
如果我将 strcmp 函数中的 'b'
更改为 "b"
。此警告不会出现,但在这两种情况下都不会打印输出。有人能帮我解决这个问题吗?
包含所有必需的库。 谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)