⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 traffic.h

📁 次界面好用但是也可能有许多不足还希望有贤人志士指点迷津!
💻 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];    // 分别指向火车和飞机
}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);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -