当前位置:文档之家› 电子地图管理系统

电子地图管理系统

#include <cstdio>
#include <cstdlib>
#include <>
#include <cstring>
#include <ctime>
#include <string>
#include <algorithm>
#include <iostream>
using namespace std;
void start();
void display();
void displaypaixu();
void displayjiansuo();
Road *head = NULL;
void SearchByClass(Road *head)
{
time_t a,b;
Road *prev,*p,*end,*temp_head;
char Run_time[80];
int i=0,Class;
printf("请输入您所要查找的道路的番号:\n");
scanf("%d",&Class);
prev=p=(Road *)malloc(sizeof(Road));n",b-a);
}
void SearchById(Road *head)
{
time_t a,b;
Road *prev,*p,*end,*temp_head;
char Run_time[80];
int i=0,LinkId;
printf("请输入您所要查找的道路的ID:\n");
scanf("%d",&LinkId);
prev=p=(Road *)malloc(sizeof(Road));n",b-a);
}
void SearchByName(Road *head)
{
time_t a,b;
Road *prev,*p,*end,*temp_head;
char Run_time[80];
int i=0;
char Name[30];
printf("请输入您所要查找的道路的名称:\n");
scanf("%s",Name);
prev=p=(Road *)malloc(sizeof(Road));n",b-a);
}
void updata(Road*head)
{
FILE*pp;
FILE*ppp;
FILE*infile;
FILE*outfile;
time_t a;
char filename[20];
Road*p1;
Road*p2;
pp=fopen("","w");
if(pp==NULL)
{
printf("文件创建失败\n");
exit(1);
}.\n");
printf("文件更新成功\n");
fclose(ppp);n",b-a);
}
Road* readfile(void)
{
FILE *fp;
unsigned short temp_data_size[1]; ...."); time(&begin);
head = BubbleSort( head );
time(&end);
i=end-begin;....");
time(&begin);
head=SelectSort( head );
time(&end);
i=end-begin;....");
time(&begin);
QListSort( &head ,NULL);
time(&end);
i=end-begin;. |\n");
printf(" | |\n");
printf(" | ");
for(i=0; i<63; i++)
{
printf(">");
//此处用time函数来暂停秒以描述程序的加载过程
start=clock();
finish=clock();
while((finish-start)<30)
finish=clock();
}
printf(" ");
printf("|\n");
printf(" | Load successfully! |\n");
printf(" | |\n");
printf(" | |\n");
printf("
--------------------------------------------------------------------------\n");
printf("\n 按任意键将进入系统 (Press any key to enter the
system) \n ");
printf("\n ");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED);
system("pause");
}
void display()
{
printf("----------------------请按照菜单提示输入您的选择-------------\n");
printf(" \n");
printf(" <1>【读取文件】\n");
printf(" <2> 【排序】 \n");
printf(" <3> 【检索】 \n");
printf(" <4> 【更新】 \n");
printf(" <0> 【退出】 \n");
}
void displayjiansuo()
{
printf(" ----------------------请按照菜单提示输入您的选择-------------\n");
printf(" \n"); printf(" <1>【指定LinkID检索】\n");
printf(" <2>【指定交叉link列表示class番号检索】\n");
printf(" <3>【指定查找岔路数检索】 \n");
printf(" <4>【指定道路名称检索】 \n");
printf(" <0>【返回】 \n");
}
void displaypaixu()
{
printf("----------------------请按照菜单提示输入您的选择-------------\n"); printf(" \n"); printf(" <1>【冒泡排序】 \n");
printf(" <2>【选择排序】 \n");
printf(" <3>【快速排序】 \n");
printf(" <0>【返回菜单】 \n");
}。

相关主题