|
|
|
|
#include<stdio.h>
|
|
|
|
|
#include<string.h>
|
|
|
|
|
#include<stdlib.h>
|
|
|
|
|
#define LEN sizeof(struct dic_info)
|
|
|
|
|
struct dic_info
|
|
|
|
|
{
|
|
|
|
|
char English[40];
|
|
|
|
|
char Chinese[100];
|
|
|
|
|
};
|
|
|
|
|
struct dic_info inf[400];
|
|
|
|
|
void enter()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
void add()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
void Edit()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
void Delete()
|
|
|
|
|
{
|
|
|
|
|
int m;
|
|
|
|
|
char a;
|
|
|
|
|
char n[40];
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫɾ<EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><EFBFBD>ʣ<EFBFBD>\n");
|
|
|
|
|
while(1)
|
|
|
|
|
{
|
|
|
|
|
scanf("%s",n);
|
|
|
|
|
for(m=0;m<400;m++)
|
|
|
|
|
{
|
|
|
|
|
if(strcmp(n,inf[m].English)==0)
|
|
|
|
|
{
|
|
|
|
|
inf[m].English=='\0';
|
|
|
|
|
inf[m].Chinese=='\0';
|
|
|
|
|
printf("ɾ<EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
printf("<EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>y<EFBFBD><EFBFBD>Y<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ز˵<EFBFBD>\n");
|
|
|
|
|
scanf("%c",&a);
|
|
|
|
|
if(a=='y'||a=='Y')
|
|
|
|
|
{
|
|
|
|
|
Delete();
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
int main(void)
|
|
|
|
|
{
|
|
|
|
|
int choice,i,n=1;
|
|
|
|
|
char a,b;
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
printf("\n\t ==============================");
|
|
|
|
|
printf("\n\t *<2A><>ӭʹ<D3AD><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DEB5><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD>ʵ<EFBFBD>*");
|
|
|
|
|
printf("\n\t ==============================\n");
|
|
|
|
|
printf("\n\t ***********<2A>˵<EFBFBD><CBB5><EFBFBD>ʾ***********\n");
|
|
|
|
|
printf("\n\t ********<2A><>1<EFBFBD><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>********\n");
|
|
|
|
|
printf("\n\t ********<2A><>2<EFBFBD><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>********\n");
|
|
|
|
|
printf("\n\t ********<2A><>3<EFBFBD><33><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>********\n");
|
|
|
|
|
printf("\n\t ********<2A><>4<EFBFBD><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>********\n");
|
|
|
|
|
printf("\n\t ********<2A><>0<EFBFBD><30><EFBFBD>˳<EFBFBD><CBB3>ʵ<EFBFBD>********\n");
|
|
|
|
|
printf("<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>еĹ<EFBFBD><EFBFBD><EFBFBD>");
|
|
|
|
|
scanf("%d",&choice);
|
|
|
|
|
switch(choice)
|
|
|
|
|
{
|
|
|
|
|
case 1:enter();break;
|
|
|
|
|
case 2:add();break;
|
|
|
|
|
case 3:Delete();
|
|
|
|
|
for(i=0;i<n;i++)
|
|
|
|
|
scanf("%c",&a);
|
|
|
|
|
if(a=='y'||a=='Y')
|
|
|
|
|
{
|
|
|
|
|
Delete();
|
|
|
|
|
n++;
|
|
|
|
|
};break;
|
|
|
|
|
case 4:Edit();break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
while(choice!=0);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|