#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#define MAXSIZE 500 //栈最大的容量
#define MAXLENGTH 20//设置最大的行和列是20 20*20
typedef struct{
int x;
int y;
}PosType;//PosType 坐标类型的变量PosType
typedef struct {
int ord;//用于存放路线
PosType seat;
int di;//用于指示下一个方向
} SElemType;//栈里面存放的每个元素的类型
typedef struct {
SElemType *top;
SElemType base;
//int stacksize;
}SqStack; //top和base是指向SElemType类型的变量的
PosType begin,end;//定义迷宫的出入口坐标 全局变量
PosType direc[4]={
{0,1},{1,0},{0,-1},{-1,0},};//移动方向依次为东南西北
int curstep=1;//记录路径的一个东西
void InitStack(SqStack);
void Push(SqStack *S,SElemType e);
bool Pop(SqStack *S,SElemType e);
bool StackEmpty(SqStack S);
void Init(void);
void Print(void );
bool Pass(PosType b);
void MarkPrint(PosType b);
void NextPos(PosType *b