⺣ - רҵ·ĵϷƽ̨

ǰλãҳ > 《C语言程序设计》课程设计报?图书信息管理系统) - 百度文库

《C语言程序设计》课程设计报?图书信息管理系统) - 百度文库

  • 62 Ķ
  • 3
  • 2025/4/30 18:31:43

6ʱͻEnter the static(lognum bookname authorname scorenum publishname time price):ҪӵͼϢͿˡ 0ʱ˳

ַֻʱͻEnter error!

γܽ

ΪС鳤ҾƵijѾܹʵĿҪ󣬲õļݡǣҾǵijǴһЩ֮ȽһļļչѾ涨õģǵļΪʱʱѡ6ǣᷢһʼҪѡ6,ѡвѯ޸ġɾܣϢҪļеһ£ʵ֣вͬͲʵЩˡ

⣬лҵԱΪǷֹģеĸһܣеĸܣҪЩǵĻ£ǺܿͰܳдãϡлǵϡΪǿģֻǵĻܹ׼ʱγơ

ҾγƵĹУѧ˺ܶණһģڵԳУƵijô󣬻ߵʾ00棬ȴУнʱҾʱǿĵʱҲֻĺ԰ܵ֧ϣеѡУԹ˼ӵʱһ󣬶ֻǴһ塣ڶǹͨΪҶCҲȽˣһЩͬѧȽİңҽǵǣ̵˹ͨҪԣΪֻ㹵ͨĺã⣬Ҳ˷ѿȥһЩҪ֪ʶ㡭

ο룺

/*................................................................................................*/ #include #include #include

struct bookinf { //ṹ int num;

char bname[20]; char wname[10]; char clanum[14]; char pubcom[10]; char pubtime[10]; float price; struct bookinf *next; };

long size; FILE * fp;

struct bookinf * vitil(void) //ļó { struct bookinf * p1,* p2,* p3; int num;

char bname[20]; char wname[10]; char clanum[14]; char pubcom[10]; char pubtime[10]; float price; long i=0; if((fp=fopen(\.txt\ //ļ { printf(\.txt!\\n\ exit(0); } while(! feof(fp)) { if(feof(fp)) break; if(i>=1) p3=p1; if((p1=(struct bookinf *)calloc(1,size))==NULL) { printf(\

exit(1); }

fscanf(fp,\ p1->num=num; strcpy(p1->bname,bname); strcpy(p1->wname,wname); strcpy(p1->clanum,clanum); strcpy(p1->pubcom,pubcom); strcpy(p1->pubtime,pubtime); p1->price=price; if(i==0) p2=p1; else p3->next=p1; i++; } if(p2->next==p1) p2->next=NULL; else p3->next=NULL; free(p1); fclose(fp); //رļ return p2; }

void inputchoice(void) { printf(\ printf(\ printf(\ printf(\ printf(\ printf(\ printf(\ printf(\}

void write_to_txt(struct bookinf * head) //дļ { struct bookinf * p; if((fp=fopen(\.txt\

{ printf(\.txt!\\n\ exit(0); } for(p=head;p;p=p->next) { fprintf(fp,\m,p->pubtime,p->price);

} fclose(fp); }

/*......................................................ӹ...............................................*/ struct bookinf * Enter(struct bookinf * head) // { struct bookinf * p1,* p2,*p3; int num; char bname[20]; char wname[10]; char clanum[14]; char pubcom[10]; char pubtime[10]; float price; if((p1=(struct bookinf *)calloc(1,size))==NULL) { printf(\ exit(1); } printf(\the static(lognum bookname authorname scorenum publishname time price):\\n\

scanf(\ p1->num=num; strcpy(p1->bname,bname); strcpy(p1->wname,wname); strcpy(p1->clanum,clanum); strcpy(p1->pubcom,pubcom); strcpy(p1->pubtime,pubtime); p1->price=price; p2=head; if(head==NULL)

  • ղ
  • Υٱ
  • Ȩ
ĵ10.00 Ԫ VIP
ߣ...

92ƪĵ

ĵ飺

6ʱͻEnter the static(lognum bookname authorname scorenum publishname time price):ҪӵͼϢͿˡ 0ʱ˳ ַֻʱͻEnter error! γܽ ΪС鳤ҾƵijѾܹʵĿҪ󣬲õļݡǣҾǵijǴһЩ֮ȽһļļչѾ涨õģǵļΪʱʱѡ6ǣᷢһʼҪѡ6,ѡвѯ޸ġɾܣϢҪļеһ£ʵ֣

οͿͨغɸƺŰ棩
ƪ
ʱؼۣ10 Ԫ/ ԭ:20Ԫ
VIP
ؼۣ29 Ԫ/ ԭ:99Ԫ
0.3 Ԫ/ ÿ150
ȫվɸ
VIP
ؼۣ29 Ԫ/ ԭ:99Ԫ
0.3 Ԫ/ ÿ150
ȫվɸ
עĵпܡֻĿ¼ݲȫ֮ǰעѸ޷ػ⣬ϵЭ㴦
΢ţfanwen365 QQ370150219
Copyright © ⺣ All Rights Reserved. ICP16052595-3 վͼ ͷQQ370150219 䣺370150219@qq.com