📄 maxst.cpp
字号:
#include <iostream.h>
#include <stdlib.h>
#include "MaxST.h"
#include "GraphOpr.h"
void main()
{
Graph* G;
FILE *fp;
char filename[255];
cout << "Filename:" << endl;
cin >> filename;
if ((fp = fopen(filename, "rt")) == NULL)
{
cout << "Unable to open file |" << filename << "|" << endl;
cout << "To know file format, View sample.gph" << endl;
exit(-1);
}
G = readGraph(fp);
if (G == NULL)
{
cout << "Unable to create graph" << endl;
cout << "To know file format, View sample.gph" << endl;
exit(-1);
}
printGraph(G);
int i;
i = 0;
Graph* max;
max = new Graph(G->n());
printGraph(max);
MaxST(G, i, max);
printGraph(max);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -