#include
using namespace std;
//=======================================位置(坐标)类========================
class Coordinate
{
friend class Node;
friend class LinkStack;
friend bool mazePath(char **maze, int m);//迷宫路径
public:
Coordinate();
int row;
int col;
};
//=======================================链栈的结点类========================
class Node
{
friend class LinkStack;
public:
Node();
Coordinate data;
Node *next;
};
//=======================================链栈类================================
class LinkStack
{
friend bool mazePath(char **maze,int m);
public:
void Recursion(Node *p);//递归函数
void PrintStack(LinkStack &L);
bool Empty(LinkStack &L);
Coordinate DeleteStack(LinkStack &L);
void AddStack(LinkStack &L,Coordinate N);
LinkStack();
private:
Node *top;
};
//========================================位置类的初始化函数=============&