From 6544282aaf713c50505b85a5e0f440bfa9775497 Mon Sep 17 00:00:00 2001 From: yangtengze Date: Mon, 3 Jul 2023 16:18:15 +0800 Subject: [PATCH] code --- code/short.h | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/code/short.h b/code/short.h index 365b498..400e5c0 100644 --- a/code/short.h +++ b/code/short.h @@ -1,6 +1,28 @@ #include"type.h" - +#define NO 30 +#define MAXV 100 //最大顶点个数 +#define INF 32767 //INF表示∞ +typedef struct +{ + int length;//边的长度,既两个地点之的长 + int money; +}ArcCell; //定义边的类型 + +typedef struct +{ int no; //顶点的编号 + char sight[10]; //地点 + char introduction[100]; //地点的介绍 +}VertexType; //定义顶点的类型 + +typedef struct +{ + int vexnum; //顶点数 + int arcnum; //边数 + VertexType vexs[NO]; //在图结构体中调用点的结构体 + ArcCell arc[NO][NO]; //在图结构体中调用边的结构体 +}MatGrath; + /***********************