?? graph.h
字號(hào):
#include <iostream>
#include <fstream>
#include <string>
#include <conio.h>
#include <dos.h>
using namespace std;
//地名節(jié)點(diǎn)
typedef struct
{
string name;
} vexnode;
//邊節(jié)點(diǎn)
typedef struct
{
int weight;
int price;
int win;
int pin;
} edgenode;
//輸出路程表節(jié)點(diǎn)
typedef struct _outlink
{
int node;
struct _outlink* link;
} outlink;
//圖對(duì)象
class graph
{
private:
edgenode** edgelist;//保存路徑信息
vexnode* vexlist;//保存地名信息
int n;//保存地點(diǎn)個(gè)數(shù)
bool readdata(string filename);//讀取數(shù)據(jù)文件函數(shù)
public:
graph();
~graph();
bool creatgraph(string filename);//路徑計(jì)算函數(shù)
bool search(string start,string end);//查詢函數(shù)
};
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -