typedef char DType typedef int BType; #define maxsize 100 #define inifinity 65535 typedef struct { DType v[maxsize];//顶点表 BType a[maxsize][maxsize];//邻接矩阵 int numD,numB;//图中的顶点数和边数 }MGraph;