程序如下,麻烦高手解释一下哦~

; Attributes: library function

; int __thiscall std__locale__facet___scalar deleting destructor_(void *, char)
??_Gfacet@locale@std@@UAEPAXI@Z proc near

arg_0= byte ptr 4

mov al, [esp+arg_0]
push esi
mov esi, ecx
test al, 1
mov dword ptr [esi], offset off_4055C8
jz short loc_401F1A

高手解释一下

湖上湖
浏览 184回答 1
1回答

慕桂英3389331

#include "stdio.h"#include "stdlib.h"#include "malloc.h"#define Null 0#define MAX 20typedef struct ArcNode{int adjvex;int weight;struct ArcNode *nextarc;}ArcNode,*AdjList;typedef struct Graph{AdjList elem[MAX+1];int vexnum;int arcnum;int GraphKind;}Graph;typedef struct Stack{int s[MAX];int top;}Stack;void initStack(Stack *s){(*s).top=0;}int Push(Stack *s, int e){if((*s).top>=MAX) return 0;else (*s).s[(*s).top++]=e;}int Pop(Stack *s, int *e){if((*s).top<=0) return 0;else *e=(*s).s[--(*s).top];}int StackEmpty(Stack s){if(s.top==0)return 1;else return 0;}void create(Graph *G){int i, start, end; AdjList p;for(i=0;i<=MAX;i++)(*G).elem[i]=Null;for(i=1;i<=(*G).arcnum;i++){scanf("%d,%d",&start,&end);p=(AdjList)malloc(sizeof(ArcNode));p->adjvex=end;p->nextarc=(*G).elem[start];(*G).elem[start]=p;if((*G).GraphKind==0){p=(AdjList)malloc(sizeof(ArcNode));p->adjvex=start;p->nextarc=(*G).elem[end];(*G).elem[end]=p;}}}int TopoSort(Graph G){int i, count, indegree[MAX+1];AdjList p; Stack S;for(i=1;i<=G.vexnum;i++)indegree[i]=0;initStack(&S);for(i=1;i<=G.vexnum;i++)for(p=G.elem[i];p;p=p->nextarc)++indegree[p->adjvex];for(i=1;i<=G.vexnum;i++)if(!indegree[i]) Push(&S,i);count=0;while(!StackEmpty(S)){Pop(&S,&i);printf("v%d ",i);++count;for(p=G.elem[i];p;p=p->nextarc)if(!(--indegree[p->adjvex])) Push(&S,p->adjvex);}if(!count) return 1;}main(){Graph G;printf("Please input the number of vex, arc and GraphKind:");scanf("%d,%d,%d",&G.vexnum,&G.arcnum,&G.GraphKind);create(&G);printf("The outcome of TopoSort is:\n");TopoSort(G);}
打开App,查看更多内容
随时随地看视频慕课网APP