//显示单词记录本 void FWORD_CO() { system("cls"); int num=1; printf("\t*****************************************\n"); color(5); printf("\t* 单词记录本 *\n"); color(16); printf("\t*****************************************\n"); color(6); struct w_word *fword=(struct w_word *)malloc(sizeof(struct w_word)); char input[50]; FILE *fp7; fp7 = fopen("word_coll.txt", "r"); if (fp7 == NULL) { color(4); printf("\t* 单纯记录本无单词 *\n"); color(16); system("pause"); return; } while (!feof(fp7)) { if(fread(fword, sizeof(struct w_word), 1, fp7) != NULL && input[0] != '\0') { printf("**************%d**************\n", num); printf("\t"); puts(fword->word_); printf("\t"); puts(fword->trans_); num++; } } printf("\t**************回车键返回*****************\n"); system("pause"); return; }