C调试出现问题
void search_name(){ struct telephone message[N];
struct telephone mes;
char reply='y';
char found='y';
struct telephone client_name;
struct telephone amend_name[20];
char client_address;
FILE*fp;
while(reply=='y')
{ found='n';
fp=fopen("message.dat","r+w");
if (fp!=NULL)
{ system("cls");
printf("\n请输入您要查找的姓名:");
scanf("%c",amend_name);
while ((fread(&mes,sizeof(struct telephone),1,fp))==1)
{ if((strcmp(amend_name,mes.client_name))==0)
{ found='y';
break;
}
}
调试出现错误:error C2664: 'strcmp' : cannot convert parameter 1 from 'struct telephone [20]' to 'const char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.