1、#include #include typedef int elemType;/************************************************************************//* 以下是关于线性表顺序存储操作的16种算法 *//************************************************************************/struct List
2、{ elemType *list; int size; int maxSize;};void againMalloc(struct List *L){ /* 空间扩展为原来的2倍,并由p指针所指向,原内容被自动拷贝到p所指向的存储空间 */ elemType *p = realloc(L->list, 2 * L->maxSize * sizeof(elemType)); if(!p){ /* 分配失败则退出运行 */ printf("存储空间分配失败!"); exit(1);