c语言错误:||error: ld returned 1 exit status|
#include <stdio.h>
#include <stdlib.h>
typedef int SElemType;
typedef int Status;
#define OK 1
#define ERROR 0
#define OVERFLOW -2
#define STACK_INT_SIZE 100
#define STACKINCREMENT 10
typedef struct {
SElemType* top;
SElemType* base;
int stacksize;
}SqStack;
Status InitStack(SqStack S){
S.base = (SElemType* ) malloc(STACK_INT_SIZE * sizeof(SElemType));
if(!S.base){
return OVERFLOW;
}
S.base = S.top;
S.stacksize = 0;
return OK;
}
其实有两个错误 一个是没有写主函数 另一个不知道哪里错了||error: ld returned 1 exit status|