#include #include #include #include #define MCGETCHAR(date)(*((char *)(date)))#defineMCGETSHORT(date)((unsignedshort)((((unsignedshort)(*((char*)(date))))<<8)|(((unsigned short)(*((char*)(date)+1)))&0x00ff)))#defineMCGETLONG(date)((((unsignedlong)MCGETSHORT((date)))<<16)|(((unsignedlong)MCGETSHORT((char*)(date)+2))&0x0000ffff))#defineMCGET3BN(date)((((unsignedlonglong)MCGETSHORT((char*)(date+1))&0x0000ffff))#define Length 65535int Sizecount=2;int Mark_1=0,Mark_2=0;int ReadFile();//读取文件void Qsort(int l,int r);//排序int Binsearch(int s,int t,int key);//二分查找int Search();//检索void Update();//更新struct RoadRecord{short ussize;long ulLinkID;short usRoadnamesize;int usDispclass;int usBrunch;int usRoadnameflag;char Roadname[20];};struct RoadRecord road[Length];struct Datestore//定义结构体存储数据{int n;char Totalsize[4];char LinkID_1[5];char Roadnamesize[2] ;char Road_flag[2];char Roadname[20];};)MCGETCHAR((date)))<<16)|(((unsignedstatic struct Datestore Ds[Length];struct dateout{long LinkID;int Dispclass;int Brunch;int Roadnameflag;char Roadname[20];};struct dateout date[Length];int ReadFile()//模块一读取文件{int m;char filename[50];unsigned short ustotalsize;unsigned long ulLinkID;unsigned short usRoadnamesize;FILE *fp_1=fopen("D:\\GTBL.dat","rb+");FILE *fp_2=fopen("D:\\Newout.txt","w+");if(fp_1==NULL)//文件不存在手动输入文件路径{printf("\n\t 无法打开文件“GTBL.dat” 或文件不再 D 盘根目录下\n\n 请手动输入文件路径(路径中请勿有中文):");scanf("%s",filename);if ( (fp_1=fopen(filename,"rb+"))==NULL){printf("\n\t 无法打开文件“GTBL.dat” 或文件不存在!\n\n");return 0;}else{printf("\n\t 文件打开成功!\n\n");}}if(fp_2==NULL){printf("\n\t 无法打开文件“newout.txt”或文件不存在!\n\n");return 0;}printf("\n\t 文件读取中......\n");while(fread(Ds[Sizecount].Totalsize ,2, 1, fp_1) == 1){fread( Ds[Sizecount].LinkID_1 , 4, 1, fp_1 ) ;//读取 LinkID 字...