You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
//ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
void DETL() {
|
|
|
|
|
int nu = 0,i=0;
|
|
|
|
|
system("cls");
|
|
|
|
|
VIEW();
|
|
|
|
|
if (fnum == 0) {
|
|
|
|
|
printf("\t\t****************************\n");
|
|
|
|
|
printf("\t\t* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫɾ<D2AA><C9BE><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD> *\n");
|
|
|
|
|
printf("\t\t****************************\n");
|
|
|
|
|
int m1=-1,qu=0,x=0;
|
|
|
|
|
char a[100];
|
|
|
|
|
scanf("%s", a);
|
|
|
|
|
struct w_word ap[100];
|
|
|
|
|
FILE *fp = fopen("wordd.txt", "r");
|
|
|
|
|
while (!feof(fp)) {
|
|
|
|
|
if (fread(&ap[i], sizeof(struct w_word), 1, fp) != NULL) {
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
fclose(fp);
|
|
|
|
|
if (i == 0) {
|
|
|
|
|
printf("\t\t* <20><EFBFBD><DEB5><EFBFBD> *");
|
|
|
|
|
system("pause");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
for (int m = 0; m < i; m++) {
|
|
|
|
|
if (strcmp(ap[m].word_,a) == 0) {
|
|
|
|
|
m1 = m;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (m1 == -1) {
|
|
|
|
|
printf("\t\t* <20><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD> *\n");
|
|
|
|
|
system("pause");
|
|
|
|
|
qu = 1;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
for (int s = m1; s < i; s++) {
|
|
|
|
|
ap[s] = ap[s + 1];
|
|
|
|
|
}
|
|
|
|
|
i--;
|
|
|
|
|
if ((fp = fopen("wordd.txt", "w")) == NULL) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
for (int k = 0; k < i; k++) {
|
|
|
|
|
if (fwrite(&ap[k], sizeof(struct w_word), 1, fp) != 1) {
|
|
|
|
|
printf("* ɾ<><C9BE>ʧ<EFBFBD><CAA7> *\n");
|
|
|
|
|
system("pause");
|
|
|
|
|
x = 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
fclose(fp);
|
|
|
|
|
//printf("* ɾ<><C9BE><EFBFBD>ɹ<EFBFBD> *");
|
|
|
|
|
}
|
|
|
|
|
if (x == 0&&qu==0) {
|
|
|
|
|
printf("\t* ɾ<><C9BE><EFBFBD>ɹ<EFBFBD> *\n");
|
|
|
|
|
printf("\t* <20>س<EFBFBD><D8B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB> *\n");
|
|
|
|
|
system("pause");
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|