求教各位大神, error C2106: '=' : left operand must be l-value
struct person { char people1age[10];
char people1realname[10];
char people1sex[10];
char people1interest[10];
char people1livecity[10];
}rent1[],rent2,rent3,rent4;
void scxx()
{ {
FILE *fp;
char a[10];
char ch;
int i,j,k;
system("cls");
printf("请输入要删除的驴友姓名:");
scanf("%s",a);
system("cls");
fp=fopen("message.txt","r");
for(i=0;i<count;i++)
{
fscanf(fp,"%s %s %s %s %s\n",rent1[i].people1realname,&rent1[i].people1age,&rent1[i].people1sex,&rent1[i].people1interest,&rent1[i].people1livecity);
if(!strcmp(rent1[i].people1realname, a))
{
printf("\t\t\t姓名 %s 年龄 %s 性别 %s 兴趣 %s 居住城市 %\n",rent1[i].people1realname,&rent1[i].people1age,&rent1[i].people1sex,&rent1[i].people1interest,&rent1[i].people1livecity);
printf("\t\t\t该驴友的信息已成功删除!\n");
printf("\n");
break;
}
}
fclose(fp);
if(i==count)
{
printf("\t\t很抱歉,没有您所要查找的驴友记录!\n");
printf("\n");
}
else
{
for(j=i;j<count-1;j++)|| (strcmp(p[j],p[j+1])>0)
{
for(k=0;k<10;k++)
{
rent1[j].people1realname[k]=rent1[j+1].people1realname[k];
}
rent1[j].people1age=rent1[j+1].people1age;
rent1[j].people1sex=rent1[j+1].people1sex;
rent1[j].people1interest=rent1[j+1].people1interest;
rent1[j].people1livecity=rent1[j+1].people1livecity;
}
fp=fopen("F:\\x.txt","w");
fclose(fp);
fp=fopen("F:\\x.txt","a");
for(j=0;j<2;j++)
{
fprintf(fp,"%s %s %s %s %s\n",rent1[j].people1realname,rent1[j].people1age,rent1[j].people1sex,rent1[j].people1interest,rent1[j].people1livecity);
}
fclose(fp);
}
count=count-1;
}
}
C:\Users\Administrator\Desktop\未命名4.cpp(229) : error C2106: '=' : left operand must be l-value
C:\Users\Administrator\Desktop\未命名4.cpp(230) : error C2106: '=' : left operand must be l-value
C:\Users\Administrator\Desktop\未命名4.cpp(231) : error C2106: '=' : left operand must be l-value
C:\Users\Administrator\Desktop\未命名4.cpp(232) : error C2106: '=' : left operand must be l-value
执行 cl.exe 时出错.
未命名4.obj - 1 error(s), 0 warning(s)