资源描述:
《c语言--仓库管理系统(3)》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、/*仓库管理系统*//******头文件(.h)***********/#include"stdio.h"#include"bios.h"#include"dos.h"#include"conio.h"#include"stdlib.h"#include"string.h"#include"mem.h"#include"ctype.h"#include"alloc.h"typedefstructz1{charnum[11];charname[15];floatprice;intamount;structz1*prior;structz1*next;}DATA;structz1*First;s
2、tructz1*Last;/******函数原型*********/voidinit();voidcreate();voiddelete();voidsearch();voidsave();voidload();voidappend();voidcopy();voidsort();voidindex();voidlist();voidabout();voidkey();intmenu_select();/*******主函数开始**********/main(){key();for(;;){switch(menu_select()){case0:init();break;case1:crea
3、te();break;case2:list();break;case3:search();break;case4:delete();break;case5:append();break;case6:save();break;case7:load();break;case8:copy();break;case9:sort();break;case10:index();break;case11:about();break;case12:exit(0);}}}menu_select(){char*f[]={"*****Cang****MENU****KU*****","0.initlist","1
4、.Enterlist","2.Listall","3.Searchrecordonname","4.Deletearecord","5.Appendrecordtofile","6.Savedatatothefile","7.Loaddatafromthefile","8.Copythefiletonewfile","9.Sortonprice","10.Indexonnumber","11.Aboutwriter","12.Quit"};chars[80];inti;intkey=0;intc=0;gotoxy(65,25);printf("ByYoungshook");gotoxy(
5、1,25);printf("pressanykeyEntermenu......");getch();clrscr();gotoxy(65,25);printf("ByYoungshook");textcolor(YELLOW);textbackground(BLUE);gotoxy(10,2);putch(0xda);for(i=1;i<44;i++)putch(0xc4);putch(0xbf);for(i=3;i<22;i++){gotoxy(10,i);putch(0xb3);gotoxy(54,i);putch(0xb3);}gotoxy(10,22);putch(0xc0);fo
6、r(i=1;i<44;i++)putch(0xc4);putch(0xd9);window(11,3,53,21);clrscr();for(i=0;i<14;i++){gotoxy(10,i+1);cprintf("%s",f[i]);}i=1;gotoxy(10,2);textbackground(LIGHTGREEN);cprintf("%s",f[1]);gotoxy(10,2);while(key!=13){while(bioskey(1)==0);key=bioskey(0);key=key&0xff?key&0xff:key>>8;gotoxy(10,i+1);textback
7、ground(BLUE);cprintf("%s",f[i]);if(key==72)i=i==1?13:i-1;if(key==80)i=i==13?1:i+1;gotoxy(10,i+1);textbackground(LIGHTGREEN);cprintf("%s",f[i]);c=i-1;}textbackground(BLACK);window(1,1,80,25);returnc;}voidkey