diff --git a/增词函数.cpp b/增词函数.cpp new file mode 100644 index 0000000..ad04334 --- /dev/null +++ b/增词函数.cpp @@ -0,0 +1,31 @@ +#include +#include +#include +void add() +{ + int i,m=0; + char n; + char ch[2]; + FILE *fp; + if((fp=fopen("data.txt","ab+"))==NULL) + { + printf("ļ!\n"); + exit(0); + } + fseek(fp,0L,2); + printf("뵥: \n"); + scanf("%s",inf[m].word); + printf("壺\n"); + scanf("%s",inf[m].mean); + if(fwrite(&inf[m],LEN,1,fp)!=1) + { + printf("ܱ"); + getchar(); + } + else + { + printf("ѱ"); + m++; + } + fclose(fp); +}