线性表——顺序表现和实现
摘要:
1.向当前线性表插入数据Status ListInsert_Sq(SqList &L,int i,ElemType e){if(iL.length+1)return ERROR; //i不合格if(L.length>=L.listsize){newbase=(ElemType*)realloc(L.elem,(L.listsize+LISTINCREMENT)*sizeof(ElemType)); //重新分配存储空间if(!newbase)exit(OVERFLOW); //如果分配空间失败L.elem=newbase; //新基址L.listsize+=LI... 阅读全文
posted @ 2014-03-22 19:22 droidxin 阅读(390) 评论(0) 推荐(0) 编辑