#includeusing namespace std;#define MVNum 10typedef char OtherInfo;typedef char VerTexype;typedef int Status;string str[10] = {"th","st","nd","th","th","th","th","th","th","th"};typedef struct ArcNode{ int adjvex; struct ArcNode * nextarc; OtherInfo info;}ArcNode;typedef struct VNode{ VerTexype data; ArcNode *firststarc;}VNode,AdjList[MVNum];typedef struct { AdjList vertices; int vexnum,arcnum;}ALGraph;int LocateVex(ALGraph G,VerTexype v);void init(ALGraph &G,int vexnum,int arcnum){ G.arcnum = arcnum; G.vexnum = vexnum; for(int i=0;i >G.vexnum>>G.arcnum; cout<<"The vexnum and arcnum are "< <<" and "< <<" respectively"< < >G.vertices[i].data; } cout< >v1>>v2; int x = LocateVex(G,v1); int y = LocateVex(G,v2); while(x==-1||y==-1||x==y){ cout<<"Maybe you typed the wrong one,please enter again"< >v1>>v2; x = LocateVex(G,v1); y = LocateVex(G,v2); } cout<<"--------------------"< adjvex = y; p1->nextarc = G.vertices[x].firststarc; G.vertices[x].firststarc = p1; ArcNode *p2 = new ArcNode; p2->adjvex = x; p2->nextarc = G.vertices[y].firststarc; G.vertices[y].firststarc = p2; } return 1;}void ALGraphDisplay(ALGraph G){ for(int i=0;i adjvex<<" "; G.vertices[i].firststarc = G.vertices[i].firststarc->nextarc; } cout<