摘要: #include #include #include #include #include #define M 40 /*定义堆栈*/ typedef struct{ double data[M]; int top; }Stack; /*初始化堆栈*/ InitStack(Stack *s) { s->top=0; } /*判断栈是否为空*/ int StEmpty(Stack *s... 阅读全文
posted @ 2005-02-25 17:40 火火 阅读(11228) 评论(29) 推荐(1) 编辑
摘要: #define M 20 #include #include #include /*定义图*/ typedef struct{ int V[M]; int R[M][M]; int vexnum; }Graph; /*创建图*/ void creatgraph(Graph *g,int n) { int i,j,r1,r2; g->vexnum=n; /*顶点用i表... 阅读全文
posted @ 2005-02-25 17:38 火火 阅读(19492) 评论(54) 推荐(0) 编辑