#define List_Size 6
#define List_Add 1
#include<stdio.h>
typedef int ElemType;
struct List_1
{ ElemType *point_1;
int Length;
int ListSize;
};
void CreatList (List_1 &L);
void DeleteList (List_1 &L);
void CreatList (List_1 &L)
{ L.point_1 = (*ElemType)malloc(List_Size * sizeof(ElemType));
if (!L.point_1)
{ printf ("Creat List was failed");
exit(OVERFLOW);
}
printf ("Creat List was succeed");
L.Length = 0;
L.ListSize = List_Size;
}
然后老提示我
issing ')' before '&'
syntax error : missing '{' before '&'
syntax error : '&'
syntax error : ')'
syntax error : missing ')' before '&'
syntax error : missing '{' before '&'
syntax error : '&'
syntax error : ')'
'CreatList' undefined; assuming extern returning int
可是按照提示,说void CreatList (List_1 &L);这句的&前面少个 ")"那也不对劲阿,还有说我creatlist没定义,我明明定义了阿