// yxm.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <iostream>
using namespace std;
#define Maxsize 15
typedef struct
{
int *bace;
int *top;
int stacksize;
}SqStack;
int InitStack(SqStack &S)
{
S.base=new int[Mxsize];
i
f(!S.base)
{
return;
}
S.top=S.base;
S.Stacksize=Maxsize;
return 1;
}
int Push(SqStack &S,int e)
{
if(S.top-S.base>=Maxsize)
{
return 0;
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余2页未读,立即下载