- 58
- 0
- 约1.16万字
- 约 15页
- 2018-10-27 发布于安徽
- 举报
WORD文档下载可编辑
专业资料整理分享
数据结构
第一、二次上机:
#include stdio.h
#include malloc.h
#include stdlib.h
#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define INFEASIBLE -1
#define OVERFLOW -2
#define list_init_size 100 //线性表存储空间的初始分配量
#define LISTINCREMENT 10 //线性表存储空间的分配增量
typedef int Status;
typedef int ElemType;
typedef struct{
ElemType *elem; //存储空间基址
int length; //当前长度
int listsize; //当前分配的存储容量(以sizeof(ElemType)为单位)
}SqList;
Status InitList_Sq(SqList L){
//构造一个空的线性表L
L.elem =(ElemType * )malloc(list_init_size*siz
原创力文档

文档评论(0)