回覆列表
  • 1 # 快樂與我同行9

    #include

    #include

    #include

    #include

    structStackRecord;

    typedefstructStackRecord*Stack;

    typedefcharElementType;

    #defineEmptyTOS-1

    #defineMinStackSize5

    structStackRecord

    {

    intCapacity;

    intTopOfStack;

    ElementType*Array;

    };

    voidMakeEmpty(StackS)

    {

    S->TopOfStack=EmptyTOS;

    }

    intIsFull(StackS)

    {

    returnS->TopOfStack==S->Capacity;

    }

    intIsEmpty(StackS)

    {

    returnS->TopOfStack==EmptyTOS;

    }

    StackCreateStack(intMaxElements)

    {

    StackS;

    /*1*/if(MaxElements

  • 中秋節和大豐收的關聯?
  • 肚子疼能不能吃藥?