//#include #include #include "MGraph.h" #include "LinkQueue.h" using namespace std; void DispMenu() { cout<<"\n请选择你要的操作"< bool IsConected(MGraph
G, int i, int j) { int k; for(k=0;k bool IsGraphConected(MGraph
G) { int i,flag=1; for(i=0;i G; int choice; do { DispMenu(); cin>>choice; switch(choice) { case 1: // 创建无向图 CreateUDG(G); cout<>u>>v; i=LocateVex(G,u); j=LocateVex(G,v); if(i==-1 ||j==-1 || i==j) // 顶点不存在 cout<<"\n顶点不存在或两顶点相同 "<