[Copy to clipboard]View Code CPP
//basic.h 常用头文件 1
2
3 #include<string.h>
4 #include<ctype.h>
5 #include<malloc.h>
6 #include<limits.h>
7 #include<stdio.h>
8 #include<stdlib.h>
9 //#include<io.h>
#include<math.h> 10
//#include<process.h> 11
#include<iostream> 12
using namespace std; 13
14
15 //函数结果状态代码 16
#define TRUE 1 17
#define FALSE 0 18
#define OK 1 19
#define ERROR 0 20
#define INFEASIBLE -1 21
22
typedef int Status; 23
typedef int Boolean;
[Copy to clipboard]View Code CPP
1 // LinkQueue-define.h 队列的链式存储结构 2
3
4 typedef struct QNode
5 {
6 QElemType data;
7 QNode *next;
8 }*QueuePtr;
9
struct LinkQueue 10
{ 11
QueuePtr front,rear; 12