题目:校园导游图
班级:信管0302
姓名:林思桦
学号:200352057
源代码:
#include<>
#include<>
#include<>
#include<>
#include<>
#include<>
#include<>
#define DIRECT "d:\\lin\\hzk16"
#define PATH "d:\\Tc"
#define PATH1 "d:\\"
#define NULL 0
#define N 38
#define MAXVAL 1000
# define PI
void save_picture();
void load_picture();
struct vertex
{int x, y; /*景点的x,y坐标*/
char *str; /*景点的名称*/
char *inform; /*景点的相关信息的存储地址*/
};
typedef struct graph
{struct vertex v[N];
int e[N][N]; /* 无向图的边*/
}adjmax;
/*---------------------------图形初始化函数---------------------------------*/
void init_graph()
{int driver=VGA,mode=VGAHI;
initgraph(&driver,&mode,PATH);
cleardevice();
}
/*-----------------------建立无向图---------------------------------------*/
adjmax creategraph(adjmax G)
{int i,j;
[1].str="主教楼";
[2].str="北功厅";
[3].str="图书馆";
[4].str="北阶教";
[5].str="清露园";
[6].str="实验楼";
[7].str="体育馆";
[8].str="校医室";
[9].str="运动场";
[10].str="教育超市";
[11].str="风雨篮球场";
[12].str="男生宿舍楼";
[13].str="女生宿舍楼";
[14].str="南门";
[15].str="西门";
[16].str="东门";
[1].x=230;[1].y=325;
[2].x=230;[2].y=265;
[3].x=165;[3].y=405;
[4].x=165;[4].y=280;
[5].x=230;[5].y=175;
[6].x=450;[6].y=325;
[7].x=505;[7].y=295;
[8].x=505;[8].y=235;
[9].x=550;[9].y=205;
[10].x=505;[10].y=175;
[11].x=505;[11].y=375;
[12].x=395;[12].y=75;
[13].x=175;[13].y=75;
[14].x=230;[14].y=405;
[15].x=5; [15].y=175;
[16].x=575;[16].y=325;
[17].x=505;[17].y=325;
[18].x=505;[18].y=405;
[19].x=505;[19].y=75;
[20].x=395;[20].y=175;
[21].x=395;[21].y=235;
[22].x=395;[22].y=325;
[23].x=285;[23].y=75;
[24].x=285;[24].y=175;
[25].x=295;[25].y=235;
[26].x=295;[26].y=325;
[27].x=175;[27].y=175;
题目校园导游图 来自淘豆网m.daumloan.com转载请标明出处.