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

📄 define.h

📁 一个海量图书查询系统
💻 H
字号:
#include <iostream.h>
#include <fstream.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <windows.h>

#define RECORDNUMBER 10000*100  //图书记录数为100万  

struct book
{
	char ISBN[11];       //图书ISBN号为10位,最后1位为串结束标志'\0'
	char category;       //图书分类分为'0'-'9'
	char bookname[61];   //图书名称为60位,最后1位为串结束标志'\0'
	char authors[11];     //作者为10位字符的组合,最后1位为串结束标志'\0'
	book()               //初始化
	{
	 ISBN[0]=NULL;
	 category='0';
	 bookname[0]=NULL;
	 authors[0]=NULL;
	}
};

struct indexISBN     //图书ISBN号索引信息        
{
	long serialnumber;   //保存原始记录在book中的相对位置
	char ISBN[11];       //图书ISBN号为10位
	indexISBN()               //初始化
	{
 	 serialnumber=0;
	 ISBN[0]=NULL;
	}
};

#define HASHSIZE 10001    //hash表的大小为1万零1
//按图书索引表中ISBN号的前四位数据建立hash表,hash表中只记录ISBN号在排序好的索引文件"indexdata.dat"中的起始位置

⌨️ 快捷键说明

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