数据结构课程设计关键路径.docVIP

  • 17
  • 0
  • 约2.77万字
  • 约 56页
  • 2020-11-18 发布于湖北
  • 举报
数据结构课程设计-关键路径 #define max 20 #includeiostream #includestdio.h #includemalloc.h using namespace std; typedef struct ArcNode//定义表结点 {int adjvex;//该弧所指向顶点的位置 struct ArcNode *nextarc;//指向下一条弧的指针 int info;//该弧的权值 }ArcNode; typedef struct VNode//定义头结点 {int data;//顶点信息 ArcNode *firstarc;//指向第一条依附该顶点的弧的指针 }VNode,AdjList[max]; typedef struct//定义ALGraph {AdjList vertices; int vexnum,arcnum;//图的当前顶点数和弧数 int kind;//图的种类标志 }ALGraph; typedef struct//定义栈 {int *base;//栈底 int *top;//栈顶 }stack; void initstack(stack s)//建立空栈 {s.base=(int*)malloc(max*sizeof(int)); s.top=s.base; } int stackempty(stack s)//

文档评论(0)

1亿VIP精品文档

相关文档