随笔分类 - C/C++一族
摘要:#define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define INFEASIBLE -1#define OVERFLOW -2#define STACK_INIT_SIZE 100 //存储空间初始分配量#define STACKINCREMENT 10 //存储空间分配增量//Status是函数的类型,其值是函数结果状态代码typedef int Status;typedef int SElemType;#inclu...
阅读全文
摘要://函数结果状态代码#define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define INFEASIBLE -1#define OVERFLOW -2//Status是函数的类型,其值是函数结果状态代码typedef int Status;typedef int ElemType;typedef struct LNode{ ElemType data; struct LNode *next;}LNode,*LinkList...
阅读全文
摘要:SqList.h//函数结果状态代码#define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define INFEASIBLE -1#define OVERFLOW -2//Status是函数的类型,其值是函数结果状态代码typedef int Status;typedef int ElemType;#define LIST_INIT_SIZE 100 //线性表存储空间的初始分配量#define LISTINCREMENT ...
阅读全文
摘要:#include<stdio.h>#include<stdlib.h>#include<malloc.h>#defineMAXSIZE50#defineERROR-1#defineOK0#defineFALSE0#defineTRUE1typedefenum{RIGHT,DOWN,LEFT,UP}Direction;typedefenum{YES,NO}MarkTag;typedefstructposition{intx;inty;}Position;typedefstruct{intorder;Positionseat;Directiondi;}SElem
阅读全文