全文预览

校园导游系统课程设计

上传者:你的雨天 |  格式:docx  |  页数:13 |  大小:130KB

文档介绍
); path[j]=u; }?}}主函数:typedefcharVerT;typedefcharDatatype;#include"AdjMWGraph.h"#include"View.h"intmain(){?ints,sss=1,j=1;?charch,qd,zd;?AdjMWGraphg;?chara[]={'A','B','C','D','E','F','G','H','I','J'};?RowColWeightrcw[]={{0,1,20},{0,3,30},{0,4,30},{1,0,20},{2,3,20},{3,0,30},{3,2,20},{3,8,30},{3,9,20},{4,0,30},{4,6,20},{5,6,15},{5,9,15},{6,4,20},{6,5,15},{6,7,10},{7,6,10},{8,3,30},{8,9,15},{9,5,15},{9,8,15}};?intn=10,e=24;?CreatGraph(g,a,n,rcw,e);?intm=g.NumOfVertices();?int*distance=newint[m];?int*path=newint[m];?intv0=0,v1;?Dijkstra(g,v0,distance,path);end:?if(j==0){system("cls");}?do{ viewshow(); cout<<"1.地点介绍2.最短路径3.结束"<<endl<<"请选择功能:"; cin>>s; system("cls"); if(s==1) { do{ viewshow(); cout<<"A.操场B.偏门C.图书馆D.大门E.食堂"<<endl <<"F.诚智楼G.博学楼H.创新楼I.海天楼J.明德楼"<<endl<<"请选择地点:"; cin>>ch;switch(ch) {

收藏

分享

举报
下载此文档