S.base = (SElemType*)malloc(STACK_INIT_SIZE) * sizeof(SElemType);
少了一对括号,改为:
S.base = (SElemType*)malloc((STACK_INIT_SIZE) * sizeof(SElemType));
newbase = (ElemType * )realloc(L.elem, L.listsize + LISTCREMENT) * sizeof(ElemType);