freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

c語言程序設(shè)計(jì)課程設(shè)計(jì)報(bào)告(1)-資料下載頁

2025-04-14 01:30本頁面
  

【正文】 )。/*模糊查詢景區(qū)信息結(jié)點(diǎn)*/struct scearea *seek_sr(struct city *hp,int cond_num,...)。/*模糊查詢城市信息結(jié)點(diǎn)*/struct scespo *seek_sp(struct city *hp,int cond_num,...)。/*模糊查詢景點(diǎn)信息結(jié)點(diǎn)*/BOOL judge_c(struct city *p, char *pcondition)。/*判斷景區(qū)信息數(shù)據(jù)項(xiàng)是否滿足查詢條件*/BOOL judge_sr(struct scearea*psr,char *pcondition)。/*判斷城市信息數(shù)據(jù)項(xiàng)是否滿足查詢條件*/BOOL judge_sp(struct scespo*psp,char *pcondition)。/*判斷景點(diǎn)信息數(shù)據(jù)項(xiàng)是否滿足查詢條件*/BOOL matchstring(char *string_item,char *pcond)。/*字符串與查詢條件是否滿足指定的運(yùn)算關(guān)系*/void travers(struct city *head)。endif /** TYPE_H_INCLUDED*/include int main(void){ COORD size = {SCR_COL, SCR_ROW}。 /*窗口緩沖區(qū)大小*/ gh_std_out = GetStdHandle(STD_OUTPUT_HANDLE)。 /* 獲取標(biāo)準(zhǔn)輸出設(shè)備句柄*/ gh_std_in = GetStdHandle(STD_INPUT_HANDLE)。 /* 獲取標(biāo)準(zhǔn)輸入設(shè)備句柄*/ SetConsoleTitle(gp_sys_name)。 /*設(shè)置窗口標(biāo)題*/ SetConsoleScreenBufferSize(gh_std_out, size)。 /*設(shè)置窗口緩沖區(qū)大小80*25*/ LoadData()。 /*數(shù)據(jù)加載*/ InitInterface()。 /*界面初始化*/ RunSys(amp。gp_head)。 /*系統(tǒng)功能模塊的選擇及運(yùn)行*/ CloseSys(gp_head)。 /*退出系統(tǒng)*/ return 0。}/** * 函數(shù)名稱: LoadData * 函數(shù)功能: 將三類基礎(chǔ)數(shù)據(jù)從數(shù)據(jù)文件載入到內(nèi)存緩沖區(qū)和十字鏈表中. * 輸入?yún)?shù): 無 * 輸出參數(shù): 無 * 返 回 值: bool類型, 功能函數(shù)中除了函數(shù)ExitSys的返回值可以為FALSE外, * 其他函數(shù)的返回值必須為TRUE. * * 調(diào)用說明: 為了能夠以統(tǒng)一的方式調(diào)用各功能函數(shù), 將這些功能函數(shù)的原型設(shè)為 * 一致, 即無參數(shù)且返回值為BOOL. 返回值為FALSE時(shí), 結(jié)束程序運(yùn)行. */ BOOL LoadData(){ int Re = 0。 gc_sys_state |= 1。 gc_sys_state |= 2。 Re = createlist(amp。gp_head)。 gc_sys_state |= Re。 gc_sys_state amp。= ~(4 + 8 + 16 Re)。 if (gc_sys_state (1 | 2 | 4 | 8 | 16)) { /*數(shù)據(jù)加載提示信息*/ printf(\n系統(tǒng)基礎(chǔ)數(shù)據(jù)不完整!\n)。 printf(\n按任意鍵繼續(xù)...\n)。 getch()。 } return TRUE。}/** * 函數(shù)名稱: createlist * 函數(shù)功能: 從數(shù)據(jù)文件讀取基礎(chǔ)數(shù)據(jù), 并存放到所創(chuàng)建的十字鏈表中. * 輸入?yún)?shù): 無 * 輸出參數(shù): head 主鏈頭指針的地址, 用來返回所創(chuàng)建的十字鏈. * 返 回 值: int型數(shù)值, 表示鏈表創(chuàng)建的情況. * 0 空鏈, 無數(shù)據(jù) * 4 已加載城市信息數(shù)據(jù),無景區(qū)信息和景點(diǎn)信息數(shù)據(jù) * 12 已加載城市信息和景區(qū)基本信息數(shù)據(jù),無景點(diǎn)信息數(shù)據(jù) * 28 三類基礎(chǔ)數(shù)據(jù)都已加載 * * 調(diào)用說明: */int createlist(struct city **head) /*創(chuàng)建鏈表*/{ struct city *hp=NULL,*p。 struct scearea *psr。 struct scespo *psp。 FILE *pFile。 int find。 int re=0。 if((pFile=fopen(gp_c_info_filename,r+))==NULL) { printf(城市信息數(shù)據(jù)文件打開失??!\n)。 return re。 } printf(城市信息數(shù)據(jù)文件打開成功!\n)。 /*從數(shù)據(jù)文件中讀城市信息數(shù)據(jù),孫茹以后進(jìn)先出方式建立的主鏈*/ while(! feof(pFile)) { p=(struct city *)malloc(sizeof(struct city))。 fscanf(pFile,%s\t\t%s\t\t%s\t\t%s\n,pc_num,p city,pc_inspnum,pc_consnum)。 psr_head=NULL。 pnext=hp。 hp=p。 } fclose(pFile)。 if(hp==NULL) { printf(城市信息數(shù)據(jù)加載失??!\n)。 return re。 } printf(城市信息數(shù)據(jù)加載成功!\n)。 (*head)=hp。 re+=4。 if((pFile=fopen(gp_sr_info_filename,r))==NULL) { printf(景區(qū)基本信息數(shù)據(jù)文件打開??!\n)。 return re。 } printf(景區(qū)基本數(shù)據(jù)文件打開成功!\n)。 re+=8。 while(! feof(pFile)) { psr=(struct scearea*)malloc(sizeof(struct scearea))。// fscanf(pFile,%s\t\t%s\t\t%s\t\t%s\t\t%s\t\t%s\t\t%s\t\t%s\n,psrsr_c_num,psr sr_num,psrscearea,psrsr_level,psrsr_location,psrsr_ticket,psrsr_time,psrsr_connum)。 psrsp_head=NULL。 p=hp。 /*在主鏈上查找蓋景區(qū)所在城市對應(yīng)的主鏈結(jié)點(diǎn)*/ while(p!=NULLamp。amp。strcmp(psrsr_c_num , pc_num)!=0) { p=pnext。 } if(p!=NULL) //如果找到,則將結(jié)點(diǎn)以后進(jìn)先出的方式插入景區(qū)支鏈 { psrnext=psr_head。 psr_head=psr。 } else //如果沒有找到,則釋放所創(chuàng)建結(jié)點(diǎn)的內(nèi)存空間 { free(psr)。 }} fclose(pFile)。 if((pFile=fopen(gp_sp_info_filename,r))==NULL) { printf(景點(diǎn)信息文件打開失??!\n)。 return re。 } printf(景點(diǎn)信息文件打開成功!\n)。 re+=16。 /*湊夠數(shù)據(jù)文件中讀取景點(diǎn)信息數(shù)據(jù),存入景區(qū)基本信息支鏈對應(yīng)的結(jié)點(diǎn)的景區(qū)支鏈中*/ while(!feof(pFile)) { psp=(struct scespo *)malloc(sizeof(struct scespo))。 //創(chuàng)建結(jié)點(diǎn),存放從數(shù)據(jù)文件中讀出的景點(diǎn)信息 fscanf(pFile,%s\t\t%s\t\t%s\t\t%s\t\t%s\t\t%s\n,psp sp_c_num,psp sp_sr_num,psp sp_num,psp scespo,psp sp_location,psp sp_time)。 /*查找景區(qū)信息支鏈上對應(yīng)的景點(diǎn)結(jié)點(diǎn)*/ p=hp。 find=0。 while(p!=NULLamp。amp。find==0) { psr=psr_head。 while(psr!=NULLamp。amp。find==0) { if(strcmp(psrsr_num,pspsp_sr_num)==0) { find=1。 break。 } psr=psrnext。 } p=pnext。 } if(find) //如果找到,則以后進(jìn)先出方式插入景點(diǎn)信息支鏈中 { pspnext=psrsp_head。 psrsp_head=psp。 } //如果沒有找到,則釋放所創(chuàng)建結(jié)點(diǎn)的內(nèi)存空間 else { free(psp)。 } } fclose(pFile)。 return re。}/** * 函數(shù)名稱: InitInterface * 函數(shù)功能: 初始化界面. * 輸入?yún)?shù): 無 * 輸出參數(shù): 無 * 返 回 值: 無 * * 調(diào)用說明: */void InitInterface(){ WORD att = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY | BACKGROUND_BLUE。 /*黃色前景和藍(lán)色背景*/ SetConsoleTextAttribute(gh_std_out, att)。 /*設(shè)置控制臺(tái)屏幕緩沖區(qū)字符屬性*/ ClearScreen()。 /* 清屏*/ /*創(chuàng)建彈出窗口信息堆棧,將初始化后的屏幕窗口當(dāng)作第一層彈出窗口*/ gp_scr_att = (char *)calloc(SCR_COL * SCR_ROW, sizeof(char))。/*屏幕字符屬性*/ gp_top_layer = (LAYER_NODE *)malloc(sizeof(LAYER_NODE))。 gp_top_layerLayerNo = 0。 /*彈出窗口的層號為0*/ gp_top_layer = 0。 /*彈出窗口的區(qū)域?yàn)檎麄€(gè)屏幕窗口*/ gp_top_layer = 0。 gp_top_layer = SCR_COL 1。 gp_top_layer = SCR_ROW 1。 gp_top_layerpContent = NULL。 gp_top_layerpScrAtt = gp_scr_att。 gp_top_layernext = NULL。 ShowMenu()。 /*顯示菜單欄*/ ShowState()。 /*顯示狀態(tài)欄*/ return。}/** * 函數(shù)名稱: ClearScreen * 函數(shù)功能: 清除屏幕信息. * 輸入?yún)?shù): 無 * 輸出參數(shù): 無 * 返 回 值: 無 * * 調(diào)用說明: */void ClearScreen
點(diǎn)擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計(jì)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1