?? base.h
字號(hào):
#include "iostream.h"
#include "iomanip.h"
#include "string.h"
#include "math.h"
#include "stdlib.h"
#define NUM 10
#define LT(a,b) ((a)<(b))
////////////////////// SqList存儲(chǔ)結(jié)構(gòu) //////////////////////////////////////
#define MAXSIZE 50000 //順序表最大長(zhǎng)度
typedef int KeyType; //關(guān)鍵字為整型
typedef struct{
KeyType key; //關(guān)鍵字
// InfoType otherinfo //其他數(shù)據(jù)項(xiàng)
}RedType; //記錄類型
typedef struct{
RedType *r; //r[0]閑置或哨兵
int length; //順序表長(zhǎng)度
}SqList; //順序表類型
/////////////////////////////////////////////////////////////////////////////
////////////////////////////// SLinkListType存儲(chǔ)結(jié)構(gòu) ////////////////////////
#define SIZE 50000 //靜態(tài)鏈表容量
//#define LT(a,b) ((a)<(b))
typedef int RcdType; //關(guān)鍵字為整型
typedef struct{
RcdType rc; //記錄項(xiàng)
int next; //指針項(xiàng)
}SLNode; //表節(jié)點(diǎn)類型
typedef struct{
SLNode *r; //0號(hào)單元為表頭節(jié)點(diǎn)
int length; //鏈表當(dāng)前長(zhǎng)度
}SLinkListType; //靜態(tài)鏈表類型
/////////////////////////////////////////////////////////////////////////////
///////////////////////////// 堆排序存儲(chǔ)結(jié)構(gòu) ////////////////////////////////
typedef SqList HeapType; //與順序表L相同
/////////////////////////////////////////////////////////////////////////////
///////////////////////////// 基數(shù)排序存儲(chǔ)結(jié)構(gòu) //////////////////////////////
#define MAX_NUM_OF_KEY 8 //關(guān)鍵字項(xiàng)數(shù)的最大值
#define RADIX 10 //關(guān)鍵字基數(shù),此時(shí)是十進(jìn)制整數(shù)的基數(shù)
#define MAX_SPACE 50000 //靜態(tài)鏈表容量
typedef char KeysType;
typedef struct{
KeysType keys[MAX_NUM_OF_KEY]; //關(guān)鍵字
// InfoType otheritems; //其它數(shù)據(jù)項(xiàng)
int next;
}SLCell; //靜態(tài)鏈表的結(jié)點(diǎn)類型
typedef struct
{
SLCell *r; //靜態(tài)鏈表的可利用空間,r[0]為頭結(jié)點(diǎn)
int keynum; //記錄的當(dāng)前關(guān)鍵字個(gè)數(shù)
int recnum; //靜態(tài)鏈表的當(dāng)前長(zhǎng)度
}SLList; //靜態(tài)鏈表類型
typedef int ArrType[RADIX]; //指針數(shù)組類型
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -