pex10_9.cpp
来自「数据结构C++代码,经典代码,受益多多,希望大家多多支持」· C++ 代码 · 共 31 行
CPP
31 行
#include <iostream.h>
#pragma hdrstop
#include "maze.h" // include the maze class
void main (void)
{
// the file containing the maze parameters
char filename[32];
cout << "Enter the data file name: ";
cin >> filename;
// build the maze by reading the file
Maze M(filename);
// solve the maze and print the result
if (M.TraverseMaze(1))
cout << endl << "You are free!" << endl;
else
cout << "No path out of the maze" << endl;
}
/*
<Run>
Enter the data file name: wex10_12.dat
12 11 7 6 2 1
You are free!
*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?