headfile.h

来自「一个学生成绩管理系统」· C头文件 代码 · 共 51 行

H
51
字号
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <malloc.h>
#define EQ(a,b)  ((a)==(b)) 
#define LT(a,b)  ((a)< (b)) 
#define LQ(a,b)  ((a)<=(b)) 
#define MaxLength 5 //哈希表的长度
#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
typedef int Status;
//分数结构体
typedef struct
{
	int datastruct;//数据结构
	int english;//英文
	int math;//数学
	//可添加更多科目
}score;
//学生信息结构体
typedef struct Student
{
	int num;//学号
	char name[10];//姓名
	char sex;//性别
	char folk[10];//民族
	char birthday[10];//出生日期	
	score s;//分数
	struct Student *next;//指向下个结点
}student,*stu;
typedef stu Hash;//定认哈希表的类型
//堆结构定义
typedef struct
{
	int r[20];//记录分数
	int length;//长度
} HeapType;
void Menu();
int ReadCommand();
void doInsert(Hash *H);
void doSearch(Hash *H);
void doSort(Hash *H);
Status Build_Hash(Hash *H,stu s);
Status Search(Hash *H,int key);
Status Sort(Hash *H);
void HeapAdjust (HeapType &H , int s, int m);
void HeapSort ( HeapType &H );
void TestData(Hash *H);
void Calculate(HeapType h);

⌨️ 快捷键说明

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