[20]; // int score; //价格 }; int main() { struct student students[15];//创建train结构体 FILE *fp = fopen("student_file.txt", "r");// 打开文件并且让fp指向文件 if (fp == NULL) { fprintf(stderr, "文件打开失败.\n"); exit(EXIT_FAILURE); } char row[80]; char *token; ...
sscanf(row,"%s%s%s%d%d%d",train[i].trainid,train[i].firststand,train[i].middlestand,train[i].finalstand,train[i].time_day,train[i].time_hour,&train[i].prize,&train[i].totalzw,&train[i].freezw);//把数据存入结构体数组 printf("%s\t%s\t%s\t%s\t%s\t%s\t%d\t%d\t%d\n",tr...