|
|
@ -11,13 +11,27 @@
|
|
|
|
/*图书结构体:图书编号,图书名,图书作者,出版社,库存量*/
|
|
|
|
/*图书结构体:图书编号,图书名,图书作者,出版社,库存量*/
|
|
|
|
typedef struct Book
|
|
|
|
typedef struct Book
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
int iNum;
|
|
|
|
|
|
|
|
char acName[15];
|
|
|
|
|
|
|
|
char acAuthor[15];
|
|
|
|
|
|
|
|
char acPress[15];
|
|
|
|
|
|
|
|
int iAmount;
|
|
|
|
|
|
|
|
struct Book* next;
|
|
|
|
}Book;
|
|
|
|
}Book;
|
|
|
|
|
|
|
|
|
|
|
|
/*读者:读者编号,读者姓名,性别,可借书数,读者已借书的编号*/
|
|
|
|
/*读者:读者编号,读者姓名,性别,可借书数,读者已借书的编号*/
|
|
|
|
typedef struct Reader
|
|
|
|
typedef struct Reader
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
int iNum;
|
|
|
|
|
|
|
|
char acName[15];
|
|
|
|
|
|
|
|
char acSex[4];
|
|
|
|
|
|
|
|
char position[20];
|
|
|
|
|
|
|
|
int iMax; //Student 20本 teacher 40本
|
|
|
|
|
|
|
|
int iAmount;
|
|
|
|
|
|
|
|
int aiBookId[100];
|
|
|
|
|
|
|
|
int balance;
|
|
|
|
|
|
|
|
int day;
|
|
|
|
|
|
|
|
struct Reader* next;
|
|
|
|
}Reader;
|
|
|
|
}Reader;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -36,7 +50,26 @@ Book* read1();
|
|
|
|
|
|
|
|
|
|
|
|
void ShowMainMenu()
|
|
|
|
void ShowMainMenu()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
system("cls");
|
|
|
|
|
|
|
|
printf("\n\n\n\n\n");
|
|
|
|
|
|
|
|
printf("\t|----------------------欢迎进入---------------------------\n");
|
|
|
|
|
|
|
|
printf("\t| 读者管理系统 \n");
|
|
|
|
|
|
|
|
printf("\t| 1、查询图书馆的总信息 \n");
|
|
|
|
|
|
|
|
printf("\t| 2、查询图书馆藏书信息 \n");
|
|
|
|
|
|
|
|
printf("\t| 3、存入新书 \n");
|
|
|
|
|
|
|
|
printf("\t| 4、旧书处理 \n");
|
|
|
|
|
|
|
|
printf("\t| 5、根据书名检索书刊信息 \n");
|
|
|
|
|
|
|
|
printf("\t| 6、查询读者的借阅信息 \n");
|
|
|
|
|
|
|
|
printf("\t| 7、查询读者信息 \n");
|
|
|
|
|
|
|
|
printf("\t| 8、读者借书 \n");
|
|
|
|
|
|
|
|
printf("\t| 9、读者还书 \n");
|
|
|
|
|
|
|
|
printf("\t| 10、文件保存 \n");
|
|
|
|
|
|
|
|
printf("\t| 11、从文件读取 \n");
|
|
|
|
|
|
|
|
printf("\t| 0、退出 \n");
|
|
|
|
|
|
|
|
printf("\t|---------------------------------------------------------\n");
|
|
|
|
|
|
|
|
printf("新打开程序需先添加管理员\n");
|
|
|
|
|
|
|
|
printf("\n");
|
|
|
|
|
|
|
|
printf("\t\t请选择(0-11):");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|