示例代码
bTree.h
// B 树实现头文件
#ifndef B_TREE_H
#define B_TREE_H
#include "errorRecord.h"
#define RANK 3 // B 树的阶,暂设为 3
#define N 16 // 数据元素个数
#define MAX 5 // 字符串最大长度 + 1
typedef int KeyType; // 设关键字域为整型
typedef struct {
char info[MAX];
} Others; // 记录的其它部分
typedef struct {
KeyType key; // 关键字
Others others; // 其它部分(由主程定义)
} Record; // 记录类型
typedef struct BTNode {
int keyNum; // 结点中关键字个数,即结点的大小
struct BTNode *parent; //