散列法的实验研究源程序.docVIP

  • 5
  • 0
  • 约7.33千字
  • 约 16页
  • 2023-07-18 发布于湖北
  • 举报
散列法的实验研究源程序 #include stdio.h #include stdlib.h /*定义函数system() exit()*/ #include fstream.h /*输入输出流,输出文件函数的头文件*/ #include string.h static char contactname[15]=tongxunlu.txt; /*静态变量 共享访问*/ #define m 21 /*作为对应质数(除数)任意的质数都可以*/ #define Max 30 /*记录的最大值*/ #define HashMaxSize 30 /*哈希表最大值*/ unsigned int key1=0; unsigned int key2=0; FILE *fp; /*定义文件型指针变量*/ typedef struct PhoneNode /*结点定义*/ { char name[15]; char number[15]; char add[30]; }Pnode,*Ptype; /*通讯录结构体的定义*/ typedef struct /*哈希地址数组存储各记录电话信息的散列地址值*/ { char HashName[15]; /*哈希表1,存储姓名*/ }HashTable1; typedef struct { char HashNum[15];

文档评论(0)

1亿VIP精品文档

相关文档