Introduction - If you have any usage issues, please Google them yourself
#include<iostream>
#include<fstream>
#include <ctime>
#include "SQ_Stack.h"
using namespace std
class MiGong
{
private:
int maze[100][100]
int n //迷宫大小(n*n)
public:
void creat() //建造迷宫
{
cout<<"请输入迷宫大小(n*n):"
cin>>n
srand((unsigned)time(0))
for(int i=0 i<n i++)
for(int j=0 j<n j++)
{
if(i==0||j==0||i==n-1||j==n-1)
maze[i][j]=1
else
maze[i][j]=(rand() (2-0))
if(i==1&&j==1)
maze[i][j]=0
else if(i==n-2&&j==n-2)
maze[i][j]=0
cout<<maze[i][j]<<" "
if(j==n-1)
cout<<endl
}
cout<<endl
}