commit fb5f7df054f21a75fb37202ae6d9909e82a3544b Author: 2644006279@qq.com <2644006279@qq.com> Date: Tue Jan 8 10:59:27 2019 +0800 first commit diff --git a/dictionary.txt b/dictionary.txt new file mode 100644 index 0000000..c7919e6 --- /dev/null +++ b/dictionary.txt @@ -0,0 +1,15 @@ +enclosure 附件 +escape 逃跑 +conjunction 结合 +fraction 分数 +convert 转化 +unlink 解开 +pointer 指针 +reset 重置 +antique 古董 +multithreaded 多线 +slightly 轻微的 +structure 结构 +appending 附加的 +multidimensional 多维的 + diff --git a/璇剧▼璁捐.cpp b/璇剧▼璁捐.cpp new file mode 100644 index 0000000..8f18842 --- /dev/null +++ b/璇剧▼璁捐.cpp @@ -0,0 +1,172 @@ +#include +#include +#include +#include +#include +void Search(char *s) +{ +freopen("dictionary.txt","r",stdin); + char a[100],b[100]; + int ok=1; + while(scanf("%s %s",a,b)!=EOF) + { + if(strcmp(s,a)==0) + {printf("%s %s",a,b);ok=0;break;} + } + if(ok)printf("Not Found!"); + putchar('\n'); + freopen("CON","r",stdin); //切换到从控制台输入数据 + freopen("CON","w",stdout); //切换到到控制台输出数据 +} +void Add(char *s,char* a) +{ + freopen("dictionary.txt","a+",stdout); + + printf("%s %s\n",s,a); + freopen("CON","r",stdin); + freopen("CON","w",stdout); +} +void Change(char* s1,char* s2) +{ + char a[100],b[100]; + char s[1000][50]; + int len,i=0,j; + memset(s,0,sizeof(a)); + freopen("dictionary.txt","r",stdin); + while(scanf("%s%s",a,b)!=EOF) + { + if(strcmp(s1,a)!=0) + strcat(s[i],a); + else if(strcmp(s1,a)==0) + strcat(s[i],s2); + + len=strlen(s[i]);s[i][len]=' '; + strcat(s[i++],b); + } + freopen("dictionary.txt","w",stdout); + for(j=0;j