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

📄 traffic.h

📁 次界面好用但是也可能有许多不足还希望有贤人志士指点迷津!
💻 H
字号:
#define MAX_VERTEX_NUM 20
#define MAX_LINE 24
#define OK 1
#define ERROR 0
#define FALSE 0
#define TRUE 1
#define YES 1
#define NO 0

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>

typedef enum{DG,DN,UDG,UDN}Gkind;
typedef enum{TRAIN,FLY}KindType;
typedef int status;
typedef char Vertextype[16];

typedef struct Dtime
{
int year;
int month;
int day;
int hour;
int minute;
int second;
}Dtime;

typedef struct Vehi
{
int money;
int line;
struct Dtime starttime[MAX_LINE];
struct Dtime drivetime;
}Vehi;


typedef struct ArcNode
{
int adjvex;
struct ArcNode *nextarc;
Vehi veh[2];
}ArcNode;

typedef struct VNode
{
Vertextype data;
ArcNode * firstarc;
}VNode,AdjList[MAX_VERTEX_NUM];

typedef struct
{
AdjList vertices;
int vexnum,arcnum;
Gkind kind;
}ALGraph;

void welcome();
void openfile(char *);
status Inite(ALGraph &G);
status Edit(ALGraph &G);
status Creat(ALGraph &G);
status Scan(ALGraph G);
status Addarc(ALGraph &G);
status Delarc(ALGraph &G);
status Addvex(ALGraph &G);
status Delvex(ALGraph &G);
status Inqurie(ALGraph G);
status shorttime(ALGraph ,int ,int ,KindType kind);
status lessmoney(ALGraph ,int ,int ,KindType );
status lesschange(ALGraph ,int ,int ,KindType );

⌨️ 快捷键说明

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