#include "malloc.h"
#include "ANDY.h" /*预定义了类c的常量和类型如:Status,OK.... */
#define LIST_INIT_SIZE 100
#define LISTINCREMENT 10
typedef struct{ /* define linear_list structure */
int *elem;
int length;
int listsize;
}Sqlist ;
Sqlist *L ; /* define Sqlist pointer */
Status InitList_Sq(){ /* the first function */
L.elem=(int *)malloc(LIST_INIT_SIZE*sizeof(int));
if(!L.elem)exit(OVERFLOW); /* if malloc failed */
L.length=0;
L.listsize=LIST_INIT_SIZE;
return OK;
}/* InitList_Sq */
main(){
Status a=InitList_Sq();
printf("\\naddress:%o \\nlist_length:%d \\nlistsize:%d \\nstatus:%d \\n",L.elem,L.length,L.listsize, a);
}
为什么我编译是有一个ERROR呢?拜托大家啦!!!!谢谢