邻接表 邻接矩阵 结构体定义
使用邻接表时候的结构体定义
#include<stdio.h>
#include<iostream>
using namespace std;
#define MaxSize 100
typedef int VertexType;
typedef int EdgeType;
//边表结点
typedef struct ArcNode
{
int adjvex; //邻接点域,存储该顶点对应的下标
int weight; //权值
#include<stdio.h>
#include<iostream>
using namespace std;
#define MaxSize 100
typedef int VertexType;
typedef int EdgeType;
//边表结点
typedef struct ArcNode
{
int adjvex; //邻接点域,存储该顶点对应的下标
int weight; //权值