missing ')' before ';'什么意思
有关线性表的一个题目#include <stdio.h>
#include<stdlib.h>
#include<malloc.h>
#define TRUE 1;
#define FALSE 0;
#define OK 1;
#define ERROR 0;
#define INFEASIBLE -1;
#define OVERFLOW -2;
typedef int Status;
typedef int ElemType;
#define LIST_INIT_SIZE 100
#define LISTINCREMENT 10
typedef struct{
ElemType*elem;
int length;
int listsize;
}SqList;
Status InitList_Sq(SqList&L){
L.elem = (ElemType * )malloc(LIST_INIT_SIZE*sizeof(ElemType));
if(!L.elem){
printf("存储空间分配失败");
exit(OVERFLOW); ////它在这里提醒我missing ')' before ';' 请问怎么进行修改
}
L.length = 0;
L.listsize = LIST_INIT_SIZE;
printf("一个空的线性表构建成功");
return OK;
#define TRUE 1;
#define FALSE 0;
#define OK 1;
#define ERROR 0;
#define INFEASIBLE -1;
#define OVERFLOW -2;
这几个都错啦,因为#define语句不能用分号结尾哦
页:
[1]