?? traffic.h
字號:
#define MAX_VERTEX_NUM 50
#define MAX_PATH 100
#define MAX_LINE 50
#define OK 1
#define ERROR 0
#define FALSE 0
#define TRUE 1
#define YES 1
#define NO 0
#define OVERFLOW -2
#define MAXERROR 3
#define MAXVER 16
#define MAX 32767
#define NEXTSTEP getch()
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
#include<conio.h>
typedef int status;
typedef char step;
typedef char CityName[MAXVER];
typedef int StrARR[MAX_PATH][MAX_VERTEX_NUM+1];
typedef struct Dtime
{
int hour;
int minute;
}Dtime;
typedef struct Tooltype
{
int money;
int line;
struct Dtime starttime[MAX_LINE];
struct Dtime drivetime;
}Tooltype;
typedef struct ArcNode
{
int adjvex;
struct ArcNode *nextarc;
Tooltype * Tool[2]; // 分別指向火車和飛機(jī)
}ArcNode;
typedef struct VNode
{
CityName data;
ArcNode * firstarc;
}VNode,AdjList[MAX_VERTEX_NUM];
typedef struct
{
AdjList vertices;
int vexnum,arcnum;
}ALGraph;
void openfile(char *);
step Scanall(ALGraph G);
step Scandes(ALGraph G);
step Scanstart(ALGraph G);
int LocateVex(ALGraph G,CityName v);
step Edit(ALGraph &G);
void editsucc(ALGraph G);
step Exit();
status DestroyGraph(ALGraph &G);
status Inite(ALGraph &G);
status Save(ALGraph G);
status Creat(ALGraph &G);
step Scan(ALGraph G);
step Addarc(ALGraph &G);
step Delarc(ALGraph &G);
step Addvex(ALGraph &G);
step Delvex(ALGraph &G);
step Inqurie(ALGraph G);
status GLtime(Dtime a,Dtime b);
void AllPath(ALGraph , int from, int to,StrARR , int &i);
step Shorttime(ALGraph ,int tool,StrARR path,int n);
step Lessmoney(ALGraph ,int tool,StrARR path,int n);
step Lesschange(ALGraph ,int tool,StrARR path,int n);
void Counttime(Dtime &arrive,Dtime start,Dtime drive,int & day ,int &hour,int &minute);
void DFS(ALGraph G,int i);
status DFSTraverse(ALGraph G);
void printpath(ALGraph G,int kind,StrARR path,int min);
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -