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

正文內(nèi)容

最新電子辭典課程設(shè)計doc-資料下載頁

2025-06-29 02:39本頁面
  

【正文】 ans_node,trans_head=NULL。 fp=fopen(filename,rb)。 if(fp==NULL){ printf(Sorry,file open failed!\n)。 return NULL。 } fseek(fp,position,SEEK_SET)。 new=(word_p)malloc(sizeof(word_t))。 fread(amp。newword_length,sizeof(newword_length),1,fp)。 fread(newword_name,sizeof(newword_name),1,fp)。 fread(amp。newtrans_num,sizeof(newtrans_num),1,fp)。 for(i=0。inewtrans_num。i++){ trans_node=(trans_p)malloc(sizeof(trans_t))。 fread(amp。trans_nodetrans_length,sizeof(trans_nodetrans_length),1,fp)。 fread(trans_nodetrans_name,sizeof(trans_nodetrans_name),1,fp)。 trans_head=insert_trans_node_text(trans_head,trans_node)。 } newhead=trans_head。 newnext=NULL。 fclose(fp)。 return new。} 模塊4代碼include include include include /**//* 模塊4: 添加新詞到自定義文本中 *//**//**/void module4(){ int i。 char str[SIZE]。 word_p result,result2。 array_p point=(array_p)malloc(sizeof(array_t))。 for(i=0。i26。i++){ pointhash[i]=(first_p)malloc(sizeof(first_t))。 pointhash[i]ch=39。a39。+i。 pointhash[i]next=NULL。 } point=load_memory_text(,point)。 printf(Please enter word:)。 gets(str)。 clear_space(str)。 result=search_word_text(point,str)。 if(result==NULL){ result2=search_word_mytext(,str)。 if(result2==NULL){ write_word_mytext_insert(,str)。 return 。 } } printf(Sorry,this word is existed!\n)。 return 。}/**/void write_word_mytext_insert(char *filename,char *str){ FILE *fp。 char trans[SIZE]。 char ch。 fp=fopen(filename,a)。 if(fp==NULL){ printf(Sorry,file open failed!\n)。 return。 }else{ fputc(39。39。,fp)。 fputs(str,fp)。 fputc(39。\n39。,fp)。 fputs(Trans:,fp)。 printf(please input trans:)。 gets(trans)。 fputs(trans,fp)。 while(1){ printf(add next translation?(y/n):)。 ch=getchar()。 if((ch==39。y39。)||(ch==39。Y39。)){ ch=getchar()。 fputc(39。@39。,fp)。 printf(please input trans:)。 gets(trans)。 fputs(trans,fp)。 }else break。 } fputc(39。\n39。,fp)。 printf(insert successed\n)。 fclose(fp)。 return 。 }} 主函數(shù)代碼include include int main(int argc,char *argv[]){ if(argc!=2){ printf(usage:\n)。 printf( ./app text\n)。 printf( ./app index\n)。 printf( ./app bin\n)。 printf( ./app insert\n)。 return 1。 } if(!strcmp(argv[1],text)) module1()。 else if(!strcmp(argv[1],index)) module2()。 else if(!strcmp(argv[1],bin)) module3()。 else if(!strcmp(argv[1],insert)) module4()。 else printf(Sorry,no this function!\n)。 return 0。} 測試 單元測試 模塊1測試正確輸入: +任意空格 退出 圖1錯誤輸入: 、漢字、數(shù)字 、漢字以及數(shù)字的組合 圖2 模塊2測試 圖3 模塊3測試正確輸入: +任意空格 退出 圖4錯誤輸入: 、漢字、數(shù)字 、漢字以及數(shù)字的組合 圖5 模塊4測試正確輸入: ,n退出 圖6錯誤輸入:,數(shù)字,中文及其組合 ,n之外的字符是否代表繼續(xù)或退出 圖7 集成測試錯誤輸入: 圖8 圖9正確輸入:(1)./app text (2)./app index (3)./app bin (4)./app insert 圖10八、使用說明書九、維護(hù),沒有輸入格式限定,目前是輸入任意字符都進(jìn)行查找,沒有輸入格式限定,目前是任意字符都可以添加進(jìn)去,提示是否繼續(xù)添加解釋后,用戶輸入y繼續(xù),輸入n結(jié)束,但目前是只要輸入的不是y就結(jié)束,在使用完畢后并沒有釋放49
點擊復(fù)制文檔內(nèi)容
外語相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1