代碼:
#include <stdio.h>#include <string.h>#include <stdlib.h>#define STACKSIZE 100typedef int ElemType;enum {a = 10, b,c,d,e,f};typedef struct stack{ ElemType *base; ElemType *top;}SeqStack;void InitialStack(SeqStack *Stack){ if ((Stack->base = (ElemType *)malloc(STACKSIZE * sizeof(ElemType))) == NULL) { 運行結果:新聞熱點
疑難解答