⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 typedef.h

📁 图书馆管理系统
💻 H
字号:
#ifndef TYPE //头文件卫士
#define TYPE

#define BOOKSIZE 1000
#define READERNUM 1000

//*****主数据库文件*****************
typedef  struct{
	char bno[5];	//书号
	char bname[21];	//书名
	int	 namenext;	//书名指针链(用记录号)
	char author[9];	//作者
	int  authnext;	//作者链指针(用记录号)
	char press[11];	//出版社
	int  prenext;	//出版社链指针(用记录号)
	char sortno[4];	//分类号
	int  storenum;	//库存数
	int  borrownum;	//借出数
}BookRecType;		//数据库记录类型

typedef struct{
	BookRecType BookDbase[BOOKSIZE];
	int len;		//文件当前的长度
}BookDbFile;
//***********************************

//*****书号索引文件******************
typedef struct{
	char bno[5];	//书号
	int RecNo;		//记录指针
}BnoRecType;		//索引文件记录类型

typedef struct{
	BnoRecType BnoIdx[BOOKSIZE];
	int len;		//当前记录个数
}BnoIdxFile;		//书号链表头索引文件
//***********************************

//*****书名索引文件******************
typedef struct{
	char bname[21];	//书名
	int head;		//链表指针
	int RecNum;		//长度
}BnameRecType;		//书名链表头文件记录文件

typedef  struct {
	BnameRecType BnameIdx[BOOKSIZE];
	int len;		//链表文件当前长度
}BnameIdxFile;		//书名链表文件类型
//***********************************

//*****作者索引文件******************
typedef struct {
	char author[9];	//作者
	int head;		//链表指针
	int RecNum;		//长度
}BauthorRecType;			//作者链头文件记录类型

typedef struct{
	BauthorRecType BauthorIdx[BOOKSIZE] ;
	int len;
}BauthorIdxFile;
//***********************************

//*****出版社索引文件****************
typedef struct{
	char press[11];	//出版社
	int head;		//链头指针
	int RecNum;		//长度
}BpressRecType;		//出版社链头文件记录类型

typedef struct{
   BpressRecType BpressIdx[BOOKSIZE];
   int len;
}BpressIdxFile;		//出版社链头文件类型
//***********************************

//******读者文件*********************
typedef struct{
	char rno[5];	//读者号
	char name[8];	//读者名
	int bn1;		//可借书数
	int bn2;		//已借书数 
}ReaderRecType;		//读者文件记录类型

typedef struct {
	ReaderRecType ReadRec[READERNUM];  
	int len;		//当前读者数
}ReaderFile;		//读者文件类型
//***********************************

//*****借还书文件********************
typedef struct{
	char rno[5];	//读者号
	char bno[5];	//书号
	char date1[9];	//借书日期
	char date2[9];	//还书日期
} BborrowRecType;	//借还书文件记录类型

typedef struct{
	BborrowRecType Bbook[BOOKSIZE] ;
	int len;		//当前借书数
}BborrowFile;		//借还书文件类型
//***********************************

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -