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

正文內(nèi)容

最新電子辭典課程設(shè)計doc-閱讀頁

2025-07-14 02:39本頁面
  

【正文】 *//* 模塊2: 建立二進制索引文件 *//**//**/void module2(void){ int i。 for(i=0。i++){ pointhash[i]=(first_p)malloc(sizeof(first_t))。a39。 pointhash[i]next=NULL。 build_dat_index(point,)。}/**/void build_dat_index(array_p point,char *filename){ FILE *fp。 fp=fopen(filename,w)。 index_p head=write_content_dat_index(point,filename)。word_num)。 write_wordnum_dat_index(word_num)。 return 。 FILE *fp。 trans_p t。 head=NULL。 return NULL。i26。 while(p!=NULL){ new=(index_p)malloc(sizeof(index_t))。 newposition=ftell(fp)。 head=insert_index_node_index(head,new)。pword_length,sizeof(pword_length),1,fp)。 fwrite(amp。 t=phead。ttrans_length,sizeof(ttrans_length),1,fp)。 t=tnext。 } } } fclose(fp)。}/*,并保存目錄開始的索引和目錄中單詞的個數(shù)*/long write_list_dat_index(index_p head,char *filename,long *word_num){ FILE *fp。 index_p p=head。 *word_num=0。 return 0。 while(p!=NULL) { strcpy(,pword_name)。 fwrite(amp。 (*word_num)++。 } } fclose(fp)。 }/**/void write_listkey_dat_index(long start_index){ FILE *fp。 return 。start_index,sizeof(long),1,fp)。}/**/void write_wordnum_dat_index(long word_num){ FILE *fp。 return 。word_num,sizeof(long),1,fp)。 return。 head=newnode。} 模塊3代碼include include include include /**//* 模塊3: 使用二進制索引文件進行單詞查詢 *//**//**/void module3(void) { char str[30]。 index_p head=NULL。 trans_p t。 while(1){ printf(Please input word:)。 clear_space(str)。 else{ index=search_index_bin(head,str)。 else{ result=search_word_with_index_bin(,index)。 while(t!=NULL){ puts(ttrans_name)。 } } } }}/*,采用鏈表結(jié)構(gòu)*/index_p load_memory_bin(char *filename,index_p head){ FILE *fp。 long start_index,word_num。 index_data new_data。 if(fp==NULL){ printf(Sorry,file open failed!\n)。 } fseek(fp,2*sizeof(long),SEEK_END)。start_index,sizeof(long),1,fp)。word_num,sizeof(long),1,fp)。 for(i=0。i++) { new=(index_p)malloc(sizeof(index_t))。new_data,sizeof(index_data),1,fp)。 newposition=。 } fclose(fp)。} /**/long search_index_bin(index_p head,char *str) { index_p p=head。 p=pnext。}/**/word_p search_word_with_index_bin(char *filename,long position) { FILE *fp。 word_p new。 fp=fopen(filename,rb)。 return NULL。 new=(word_p)malloc(sizeof(word_t))。newword_length,sizeof(newword_length),1,fp)。 fread(amp。 for(i=0。i++){ trans_node=(trans_p)malloc(sizeof(trans_t))。trans_nodetrans_length,sizeof(trans_nodetrans_length),1,fp)。 trans_head=insert_trans_node_text(trans_head,trans_node)。 newnext=NULL。 return new。 char str[SIZE]。 array_p point=(array_p)malloc(sizeof(array_t))。i26。 pointhash[i]ch=39。+i。 } point=load_memory_text(,point)。 gets(str)。 result=search_word_text(point,str)。 if(result2==NULL){ write_word_mytext_insert(,str)。 } } printf(Sorry,this word is existed!\n)。}/**/void write_word_mytext_insert(char *filename,char *str){ FILE *fp。 char ch。 if(fp==NULL){ printf(Sorry,file open failed!\n)。 }else{ fputc(39。,fp)。 fputc(39。,fp)。 printf(please input trans:)。 fputs(trans,fp)。 ch=getchar()。y39。Y39。 fputc(39。,fp)。 gets(trans)。 }else break。\n39。 printf(insert successed\n)。 return 。 printf( ./app text\n)。 printf( ./app bin\n)。 return 1。 else if(!strcmp(argv[1],index)) module2()。 else if(!strcmp(argv[1],insert)) module4()。 retu
點擊復(fù)制文檔內(nèi)容
外語相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1