#include"type.h" #include /*********************** 功能:创建图结构 输入:给图中的点赋予该点的编号,名称以及简介 输出:无 ***********************/ int CreatGrath(MatGrath &G)//进行图的创建 { int i,j; G.vexnum=10; //说明图的顶点的数目 G.arcnum=14; //说明图的边的数目 for(i=1;i<=G.vexnum;i++) { G.vexs[i].no=i; } strcpy(G.vexs[1].sight,"烟台市"); strcpy(G.vexs[1].introduction,"山东省沿海城市,位于山东半岛中部"); strcpy(G.vexs[2].sight,"青岛市"); strcpy(G.vexs[2].introduction,"山东省沿海城市,位于山东半岛南部,有崂山风景区等众多景点"); strcpy(G.vexs[3].sight,"潍坊市"); strcpy(G.vexs[3].introduction,"景色优美,气候宜人,经济发达"); strcpy(G.vexs[4].sight,"威海市"); strcpy(G.vexs[4].introduction,"山东省辖地级市,位于山东半岛东端,北,东,南三面濒临 黄海"); strcpy(G.vexs[5].sight,"东营市"); strcpy(G.vexs[5].introduction,"山东省辖地级市,位于山东省东北部,黄河入海口的三角洲地带"); strcpy(G.vexs[6].sight,"滨州市"); strcpy(G.vexs[6].introduction,"山东省辖地级市,位于山东省北部、鲁北平原、黄河三角洲腹地"); strcpy(G.vexs[7].sight,"德州市"); strcpy(G.vexs[7].introduction,"山东省辖地级市,位于山东省西北部,北以新河为界,"); strcpy(G.vexs[8].sight,"聊城市"); strcpy(G.vexs[8].introduction,"山东省辖地级市,位于山东省西部,西部靠漳卫河与河 "); strcpy(G.vexs[9].sight,"菏泽市"); strcpy(G.vexs[9].introduction,"位于山东西南部,鲁苏豫皖交界地带,东与济宁市相邻"); strcpy(G.vexs[10].sight,"泰安市"); strcpy(G.vexs[10].introduction,"位于山东省中部,是鲁中地区中心城,国家历史文化名城"); for(i=0;i