初始化线性表
#include <stdio.h>
typedef enum{OK,ERROR,OVERFLOW}Status;
#define MAXSIZE 100
#define ElemType int
typedef struct{
ElemType data[MAXSIZE];
int length;
}SqList;
Status InitList(SqList,&L)
{
L = new SqList;
L.elem = new ElemType[MAXSIZE];
if(!L.elem) exit(OVERFLOW);
L.length = 0;
printf("初始化成功!\n");
return OK;
}
void main()
{
SqList L;
InitList(L);
}
编译后一直显示在14行出现[Error] expected declaration specifiers or '...' before '&' token
应如何修改