while(feof(fp==0)){
fscanf(fp,"%d%s%d%d",ptr->num,ptr->name,ptr->money,ptr->loss);
ptr=ptr->next;
}
fclose(fp);
error:invalid type argument of '->'(have 'int')
为什么会这样
while(feof(fp==0)){
fscanf(fp,"%d%s%d%d",ptr->num,ptr->name,ptr->money,ptr->loss);
ptr=ptr->next;
}
fclose(fp);
error:invalid type argument of '->'(have 'int')
为什么会这样
ptr不是指针是结构体,只有指针才能用->,结构体要用.