diff --git a/未命名7.cpp b/未命名7.cpp new file mode 100644 index 0000000..56dfb89 --- /dev/null +++ b/未命名7.cpp @@ -0,0 +1,28 @@ +void add() +{ + int i,m=0; + char n; + char ch[2]; + FILE *fp; + if((fp=fopen("data.txt","ab+"))==NULL) + { + printf("ļ!\n"); + exit(1); + } + 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("ѱ\n"); + m++; + } + fclose(fp); +}