📄 main.cpp
字号:
#include <iostream.h>
#include <stdlib.h>
#include "Graph.h"
void main()
{
Graph<int> G,G1;
G.ReadGraph("Graph.txt");
cout<<endl;
G.PrintEdge();
cout<<endl;
cout<<"Neighbors: 0"<<endl;
cout<<G.GetNeighbors(0)<<endl;
cout<<"First Neighbor:"<<endl;
cout<<G.GetFirstNeighbor(0)<<endl;
cout<<"Next Neighbor:"<<endl;
cout<<G.GetNextNeighbor(0,1)<<endl;
cout<<"DFS:"<<endl;
G.DFS(0);
cout<<endl;
cout<<"BFS:"<<endl;
G.BFS(0);
cout<<endl;
G.OutputShortestPath(0,G);
cout<<endl;
G1.ReadGraph("Graph1.txt");
cout<<endl;
G1.PrintEdge();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -