没有合适的资源?快使用搜索试试~ 我知道了~
程序时机结构
需积分: 0 0 下载量 46 浏览量
2013-07-02
07:06:51
上传
评论
收藏 1KB TXT 举报
温馨提示
试读
3页
实现一个数据结构中的顺序表的就地逆置的程序
资源推荐
资源详情
资源评论
#include<stdio.h>
#include<malloc.h>
#include<stdlib.h>
#define TURE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define INFEASIBLE -1
#define OVERFLOW -2
typedef int Status;
typedef int ElemType;
#define LIST_INIT_SIZE 100 //初始容量
#define LISTINCREMENT 10 //空间增量
typedef struct{
ElemType *elem; //存储空间基址
int length; //表长,元素个数
int listsize; //表容量,空间大小
}SqList;
Status InitList_Sq(SqList &L) {
//构造一个空的线性表L
L.elem=(ElemType *)malloc(LIST_INIT_SIZE*sizeof(ElemType)) ;
if(!L.elem) exit(OVERFLOW);
L.length=0;
L.listsize=LIST_INIT_SIZE;
return OK;
#include<malloc.h>
#include<stdlib.h>
#define TURE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define INFEASIBLE -1
#define OVERFLOW -2
typedef int Status;
typedef int ElemType;
#define LIST_INIT_SIZE 100 //初始容量
#define LISTINCREMENT 10 //空间增量
typedef struct{
ElemType *elem; //存储空间基址
int length; //表长,元素个数
int listsize; //表容量,空间大小
}SqList;
Status InitList_Sq(SqList &L) {
//构造一个空的线性表L
L.elem=(ElemType *)malloc(LIST_INIT_SIZE*sizeof(ElemType)) ;
if(!L.elem) exit(OVERFLOW);
L.length=0;
L.listsize=LIST_INIT_SIZE;
return OK;
资源评论
小孩子的童心
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功