-3
我不断收到这个错误,当我尝试在名字和姓氏来设置的第一个字符为空,并返回到一个1不兼容的类型赋值为null
我的代码是...
int DeregisterStudent(int SID, struct studentdata SRecord[])
{
int index;
index = SRecordSearch(SID, MAXRECS, SRecord);
if(index >= 0)
{
SRecord[index].sid = 0;
SRecord[index].lastname = '\0';
SRecord[index].firstname = '\0';
return 1;
}
return 0;
}
,我得到的错误是错误:不兼容的类型赋值为 这两条线
SRecord[index].lastname = '\0';
SRecord[index].firstname = '\0';
非常感谢!这工作。 – 2015-04-05 16:49:51