资源简介
输入:
输入选择的操作类型的选项进行相应的查询操作
② 输出:
输出相应信息
③ 程序所能达到的功能:
系统能够实现校园平面图的输出,查询景点介绍,查询景点间的所有路径,查询景点间的最短路径,查询浏览校园的路线。
代码片段和文件信息
#include“Graph.h“
//创建无向图
void create(AMGraph &Gint vnumint anum)
{
int i j;
G.vexnum = vnum;
G.arcnum = anum;
for (i = 0; i < G.vexnum; i++)
G.vexs[i].num = i;
strcpy_s(G.vexs[0].name “正门“);
strcpy_s(G.vexs[1].name “一教“);
strcpy_s(G.vexs[2].name “二教“);
strcpy_s(G.vexs[3].name “综餐“);
strcpy_s(G.vexs[4].name “大礼堂“);
strcpy_s(G.vexs[5].name “翠园“);
strcpy_s(G.vexs[6].name “沁园“);
strcpy_s(G.vexs[7].name “基教“);
strcpy_s(G.vexs[8].name “图书馆“);
strcpy_s(G.vexs[9].name “体育馆“);
strcpy_s(G.vexs[10].name “学二“);
strcpy_s(G.vexs[11].name “排球场“);
strcpy_s(G.vexs[12].name “九栋“);
strcpy_s(G.vexs[13].name “游泳馆“);
strcpy_s(G.vexs[14].name “学一“);
strcpy_s(G.vexs[15].name “15栋“);
strcpy_s(G.vexs[16].name “10栋“);
strcpy_s(G.vexs[17].name “1栋“);
strcpy_s(G.vexs[18].name “第九实验楼“);
strcpy_s(G.vexs[19].name “西操场“);
strcpy_s(G.vexs[20].name “篮球场“);
strcpy_s(G.vexs[21].name “出口“);
strcpy_s(G.vexs[0].intro “石家庄铁道大学南门“);
strcpy_s(G.vexs[1].intro “第一教学楼“);
strcpy_s(G.vexs[2].intro “第二教学楼“);
strcpy_s(G.vexs[3].intro “饭菜可口“);
strcpy_s(G.vexs[4].intro “演出等活动的地方“);
strcpy_s(G.vexs[5].intro “小花园“);
strcpy_s(G.vexs[6].intro “小花园,有喷泉“);
strcpy_s(G.vexs[7].intro “基础教学楼“);
strcpy_s(G.vexs[8].intro “可借阅图书,内含电子阅览室,自习室“);
strcpy_s(G.vexs[9].intro “篮球,羽毛球,排球场地“);
strcpy_s(G.vexs[10].intro “饭菜一般,有黑暗料理“);
strcpy_s(G.vexs[11].intro “露天排球场“);
strcpy_s(G.vexs[12].intro “男生宿舍“);
strcpy_s(G.vexs[13].intro “露天游泳馆“);
strcpy_s(G.vexs[14].intro “饭菜一般,价格便宜“);
strcpy_s(G.vexs[15].intro “女生宿舍“);
strcpy_s(G.vexs[16].intro “男生宿舍“);
strcpy_s(G.vexs[17].intro “女生宿舍“);
strcpy_s(G.vexs[18].intro “机房,实验室“);
strcpy_s(G.vexs[19].intro “适宜足球,篮球,排球,乒乓球,跑步“);
strcpy_s(G.vexs[20].intro “大场地篮球场“);
for (i = 0; i < G.vexnum;i++)
for (j = 0; j < G.vexnum; j++)
G.arcs[i][j].weight= MaxInt;
G.arcs[0][1].weight = G.arcs[1][0].weight = 300;
G.arcs[0][2].weight = G.arcs[2][0].weight = 200;
G.arcs[1][2].weight = G.arcs[2][1].weight = 100;
G.arcs[1][3].weight = G.arcs[3][1].weight = 400;
G.arcs[1][4].weight = G.arcs[4][1].weight = 200;
G.arcs[1][5].weight = G.arcs[5][1].weight = 300;
G.arcs[1][6].weight = G.arcs[6][1].weight = 300;
G.arcs[3][7].weight = G.arcs[7][3].weight = 300;
G.arcs[4][8].weight = G.arcs[8][4].weight = 300;
G.arcs[5][9].weight = G.arcs[9][5].weight = 500;
G.arcs[6][8].weight = G.arcs[8][6].weight = 50;
G.arcs[7][8].weight = G.arcs[8][7].weight = 100;
G.arcs[7][9].weight = G.arcs[9][7].weight = 100;
G.arcs[7][11].weight = G.arcs[11][7].weight = 200;
G.arcs[7][12].weight = G.arcs[12][7].weight = 100;
G.arcs[7][18].weight = G.arcs[18][7].weight = 50;
G.arcs[9][13].weight = G.arcs[13][9].weight = 100;
G.arcs[9][19].weight = G.arcs[19][9].weight = 100;
G.arcs[10][11].weight = G.arcs[11][10].weight = 20;
G.arcs[10][12].weight = G.arcs[12][10].weight = 100;
G.arcs[10][14].weight = G.arcs[14][10].weight = 10;
G.ar属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 56320 2017-07-07 11:12 校园导游\Debug\校园导游.exe
文件 549892 2017-07-07 11:12 校园导游\Debug\校园导游.ilk
文件 830464 2017-07-07 11:12 校园导游\Debug\校园导游.pdb
文件 15466496 2017-07-07 11:22 校园导游\ipch\校园导游-e54538e9\校园导游-85feedae.ipch
文件 76651 2017-07-06 19:48 校园导游\截图\0.1.jpg
文件 134689 2017-07-06 19:50 校园导游\截图\0.2.jpg
文件 114585 2017-07-06 19:50 校园导游\截图\0.3.jpg
文件 44151 2017-07-06 19:24 校园导游\截图\1.jpg
文件 60956 2017-07-07 11:13 校园导游\截图\2.jpg
文件 47607 2017-07-06 19:37 校园导游\截图\3.0.jpg
文件 243579 2017-07-06 19:25 校园导游\截图\3.jpg
文件 12855 2017-07-06 19:44 校园导游\截图\4.0.jpg
文件 23990 2017-07-06 19:26 校园导游\截图\4.jpg
文件 40238 2017-07-06 19:26 校园导游\截图\5.jpg
文件 30001 2017-07-06 19:23 校园导游\截图\shuru.jpg
文件 14344 2017-07-06 19:29 校园导游\截图\景点合法1.jpg
文件 1782 2017-07-07 11:12 校园导游\校园导游\Debug\cl.command.1.tlog
文件 16982 2017-07-07 11:12 校园导游\校园导游\Debug\CL.read.1.tlog
文件 758 2017-07-07 11:12 校园导游\校园导游\Debug\CL.write.1.tlog
文件 2 2017-07-07 11:12 校园导游\校园导游\Debug\li
文件 2 2017-07-07 11:12 校园导游\校园导游\Debug\li
文件 2 2017-07-07 11:12 校园导游\校园导游\Debug\li
文件 2 2017-07-07 11:12 校园导游\校园导游\Debug\li
文件 2 2017-07-07 11:12 校园导游\校园导游\Debug\li
文件 2 2017-07-07 11:12 校园导游\校园导游\Debug\li
文件 2 2017-07-07 11:12 校园导游\校园导游\Debug\li
文件 2 2017-07-07 11:12 校园导游\校园导游\Debug\li
文件 2 2017-07-07 11:12 校园导游\校园导游\Debug\li
文件 2 2017-07-07 11:12 校园导游\校园导游\Debug\li
文件 2 2017-07-07 11:12 校园导游\校园导游\Debug\li
............此处省略59个文件信息
相关资源
- 国际象棋的qt源代码
- C++中头文件与源文件的作用详解
- C++多线程网络编程Socket
- VC++ 多线程文件读写操作
- 利用C++哈希表的方法实现电话号码查
- 移木块游戏,可以自编自玩,vc6.0编写
- C++纯文字DOS超小RPG游戏
- 学校超市选址问题(数据结构C语言版
- VC++MFC小游戏实例教程(实例)+MFC类库
- 数据结构,迷宫问题C语言版源代码
- DSDEMO-C演示(数据结构C语言版 严蔚敏
- 连铸温度场计算程序(C++)
- 6自由度机器人运动学正反解C++程序
- Em算法(使用C++编写)
- libstdc++-4.4.7-4.el6.i686.rpm
- VC++实现CMD命令执行与获得返回信息
- 白话C++(全)
- C++标准库第1、2
- 大数类c++大数类
- C++语言编写串口调试助手
- c++素数筛选法
- C++ mqtt 用法
- 商品库存管理系统 C++ MFC
- c++ 多功能计算器
- C++17 In Detail
- 嵌入式QtC++编程课件
- 颜色识别形状识别STM103嵌入式代码
- 数据结构 图的遍历源代码
- 数据结构实验源代码集
- 实验报告:数据结构长整数四则运算
川公网安备 51152502000135号
评论
共有 条评论