回复 10楼 yaobao
你靠蒙的啊?
授人以渔,不授人以鱼。
void save(char book_num[],char book_name[],int num) { FILE *book_fp; struct bk *t; if((book_fp=fopen("C:\\Users\\zll\\Downloads\\book.txt","wb"))==NULL) { printf("不能建立图书文件!\n"); return; } t=(struct bk *)malloc(sizeof(struct bk)); strcpy(t->book_num,book_num); strcpy(t->book_name, book_name); t->book_kc=t->book_xc=num; l->next=t;t->next=NULL; fwrite(t,sizeof(struct bk),1,book_fp); }