航班信息检索与查询(基数排序)

本文记录了一周内完成数据结构课程设计的经历,重点介绍了如何使用基数排序方法进行航班信息的检索与查询。
摘要由CSDN通过智能技术生成

花了一周的时间搞数据结构课程设计,现在想起来也不咋样。

                   航班信息检索与查询系统源代码
在”StdAfx.h”文件中:

#if !defined(AFX_STDAFX_H__5D4863DA_370E_4BF2_ACA1_DEF9B55C465C__INCLUDED_)
#define AFX_STDAFX_H__5D4863DA_370E_4BF2_ACA1_DEF9B55C465C__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif 
#define WIN32_LEAN_AND_MEAN		

#include <stdio.h>
#include <string.h>
#include"stdlib.h"
#include"cctype"

#endif 

在”StdAfx.cpp”文件中:

#include "stdafx.h"

在” 航班信息检索与查询.h”文件中:
void Menu();
void Menu2();
void Save();
int Bsearch(int l,int r);
void Read_Inf();
void Search_Inf(int f);
void Add_Inf();
void Del_Inf();
void Dis_Inf(int k,int f);
bool Choice(char *s);
void Get_Tiket();
void Exit();

#define Max 100005
#define Maxn 36
#define N 20

typedef struct Plan{
	char ID[10];
	char start[N];
	char end[N];
	int money;
	int space;
	char Tdate[N];
	char Tstart[N];
	char Tend[N];
	char name[N];
}PlanNode;

typedef struct Node{
	char key[10];
	PlanNode inf;
	int next;
}SLNode;

typedef struct{
    SLNode s[Max];
	int keyCnt;
	int PCnt;
}SList;

void Radix_Sort(SList &L);

在” 航班信息检索与查询.cpp”文件中:

#include "stdafx.h"
#include"航班信息检索与查询.h"

int x[Maxn],y[Maxn];
const int form[]={8,8,7,8,9,9,7,5,4};

SList L;

int main(int argc, char* argv[])
{
	system("color 6");
	L.PCnt=0;
	L.keyCnt=6;
	Read_Inf();
	Menu();
	return 0;
}

	
void Menu()
{
	char ch[]="                         ";
	printf("%s┍┅┅┅┅┅┅┅┅┅┅┅┅┒\n",ch);
	printf("%s│   航班信息检索与查询   │\n",ch);
	printf("%s┕┅┅┅┅┅┅┅┅┅┅┅┅┘\n",ch);
	printf("%s┍┅┅┅┅┅┅┅┅┅┅┅┅┒\n",ch);
	printf("%s│    1.查询航班信息      │\n",ch);
	printf("%s│    2.显示全部航班信息  │\n",ch);
	printf("%s│    3.添加航班信息      │\n",ch);
	printf("%s│    4.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值