刚接触数据结构,请高手赐教
#include <stdio.h>#include <stdlib.h>
typedef int Status;
#define OK 1
#define ERROR 0
#define OVERFLOW -2
#define LIST_INIT_SIZE 100
#define LISTINCREMENT 10
typedef struct{
int *elem;
int length;
int listsize;
}SqList;
Status InitList_Sq(SqList &L)
{
//构造空线性表L
L.elem = (int *)malloc(LIST_INIT_SIZE*sizeof(int));
if(!L.elem) exit(OVERFLOW);
L.length = 0;
L.listsize = LIST_INIT_SIZE;
return OK;
}//InitList_Sq
将这个程序修改下,使之能在C++坏境下正确运行