本程序主要是采用队列的思想,将4个方向的通路入队,然后依次先去,直到入口结束!!~~~~~~~~~~~~~~
定义头文件t11.h
#include"stdio.h"
#include"string.h"
#include"ctype.h"
#include"malloc.h"
#include"stdlib.h"
#include"io.h"
#include"math.h"
#define
#define
#define
#define
typedef int Status;
typedef int Boolean;
定义队列的数据结构包含在m1.h头文件里
#define INIT_STACK_SIZE 40
#define STACK_ADD 10
#define INIT_QUEUE 100
#define INIT_ADD 40
typedef struct
{
}migong,*mi;
typedef struct
{
}ji,*hui;
typedef struct
{
}cun;
typedef struct
{
} Sqstack;
typedef struct sq
{
}sq;
typedef struct
{
}dui;
定义的实现函数代码(一些实现函数)定义在文件migong.cpp里
void initdui(dui &L)
{
}
void enqueue(dui &L,int i,int j,int i1,int j1)
{
}
void initstack(Sqstack &L)
{
}
Status push(Sqstack &L,int q,int p)
{