[求助][原创]strcmp的问题
void find()
{
students *p;
p=head;
p1=p->next;
while(p1)
{p2=p1->next;
while(p2)
{
if(strcmp(p2->id,p1->id)==0)
{
students *t;
*t=*p1;*p1=*p2;*p2=*t;
}
p2=p2->next;
}
p1=p1->next;
}
}
请问为什么我在运行的时候显示error C2664: 'strcmp' : cannot convert parameter 1 from 'char' to 'const char *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
什么意思呢?我的strcmp输出的格式不对吗?strcmp应该怎么运用呢?