早教吧 育儿知识 作业答案 考试题库 百科 知识分享

warningC4133:'function':incompatibletypes-from'structbk*'to'structiobuf*'voidInsertNewBook(charbooknum[],charbookname[],intnumber)/*增加1本新书,读入新书的名称、编号和数量*/{

题目详情
warning C4133: 'function' : incompatible types - from 'struct bk *' to 'struct _iobuf *'void Insert_New_Book(char book_num[],char book_name[],int number) /*增加1本新书,读入新书的名称、编号和数量*/ { struct bk *book_fp; struct bk *p,*q,*t; q=p=h_book; while(p!=NULL&&strcmp(p->book_num,book_num)!=0) { q=p; p=p->next; } if(strcmp(p->book_num,book_num)==0) { printf("\n\t\t此编号已经存在,请重新输入!\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=number; q->next=t;t->next=NULL; if((book_fp=fopen("book.txt","ab"))==NULL) { printf("不能建立图书文件,初始化失败!请重新启动系统!\n"); return; } /*将新书信息添加到文件中*/ fwrite(t,sizeof(struct bk),1,book_fp); fclose(book_fp); }
▼优质解答
答案和解析
那个函数这样改:void list(struct goods *head) 加上一个goods 还有建立链表的时候两个输入语句这样改: scanf("%ld",&p1->codeID); getchar(); scanf("%s",p1->name); getchar(); scanf("%d",&p1-...
看了warningC4133:'f...的网友还看了以下: