//CPath.h 文件
#include<iostream>
#include<fstream>
using namespace std;
class CPath //应用程序类
{
public:
int m[50][50];
void Initpath(int jshux,int jshuy,int qshu);
int path(int beginx,int beginy,int endx,int endy);
void output(int x,int y);
};
struct Node //
{
int x;
int y;
};
typedef struct stack // 链栈
{
int di;
struct Node seat;
stack *next;
}*pstack;
void Push(pstack &top,stack &c)
{
stack *s=new(stack);
s->di=c.di;
s->seat=c.seat;
s->next=top;
top=s;
}
int Pop(pstack &top,stack &c)
{
if(top==NULL) return 0;
stack *p;
c.di=top->di;
c.seat=top->seat;
p=top;
top=top->next;
delete(p);
return 1;
}
// CPath.cpp 文