//线性表的顺序表示指的是:用一组地址连续的存储单元依次存储线性表的数据元素.//只要确定了存储线性表的起始位置,线性表中任一数据元素都可随机存取,//所以线性表的顺序表存储结构是一种随机存取的存储结构.#define OVERFLOW -1#define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define NULL 0#define LIST_INIT_SIZE 100 //线性表存储空间的初始分配量#define LISTINCREMENT 10 //线性表存储空间的分配增量#include<iostream>#...
#define MAXSIZE 100#define ERROR 0#include<iostream>#include<cstdio>using namespace std;typedef int ElemType; typedef struct { ElemType elem[MAXSIZE]; int length; }SqList;void InitList(SqList &L)//初始化操作,将线性表置空{ L.length = 0; } void CreatList(SqList &L,int n)//建立一个...
//函数结果状态#define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define INFEASIBLE -1#define NULL 0#define OVERFLOW -2#include<iostream>#include<stdio.h>#include<malloc.h>using namespace std;typedef int Status;//Staus是函数的类型,其值是函数结果typedef int DateType; //DateType可以使相应任何的数据类型如int、float、char//结点类型定...