最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

順序棧的基本操作出現(xiàn)一個(gè)錯(cuò)誤

順序棧的基本操作出現(xiàn)一個(gè)錯(cuò)誤

C++
noe12138 2019-05-04 11:01:12
#include <stdio.h>#include <iostream>#include <malloc.h>using namespace std;typedef char ElemType;#define MAXSIZE 50typedef struct{ ElemType data[MAXSIZE]; int top;}SqStack;void InitStack(SqStack *&S){ S=(SqStack*)malloc(sizeof(SqStack)); S->top=0;}void DestroyStack(SqStack *&S){ free(S);}bool StackFull(SqStack *S){ if(S->top==MAXSIZE) return true; else return false;}bool StackEmpty(SqStack *S){ if(S->top==MAXSIZE) return true; else false;}bool Push(SqStack *&S,ElemType e){ if(S->top==MAXSIZE) return false; S->data[S->top]=e; S->top++; return true;}bool Pop(SqStack *&S,ElemType &e){ if(S->top==0) return false; S->top--; e=S->data[S->top]; return true;}bool GetTop(SqStack *&S,ElemType &e){ if(S->top==0) return false; e=S->data[S->top-1]; return true;}
查看完整描述

3 回答

?
onemoo

TA貢獻(xiàn)883條經(jīng)驗(yàn) 獲得超454個(gè)贊

你的代碼只有你貼出來(lái)的這些嗎?? 這里沒(méi)有?main?函數(shù)??!

查看完整回答
反對(duì) 回復(fù) 2019-08-10
  • noe12138
    noe12138
    謝謝,已經(jīng)解答了,是main前加多了一個(gè)下劃線,粗心了
  • 3 回答
  • 0 關(guān)注
  • 1010 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)