Int main ()//main function
{
Num char name [20], [20].
Char a0 [20], b0 [20], c0 [30];
Char a1 [20], [20] b1, c1 [20].
Int j, I, g;
Int w, k;
int flag=0;
While (1)
{
The switch (menu_select ())
{
Case 1:
M=the Create (H);//create an array of auxiliary
break;
Case 2:
Input_name (Inf, m, H);//name as a keyword to create a hash table
Print_name (H);
While (1)
{
Flag=0;
printf("\n");
Printf (" 1: search \ n ");
Printf (" 2: insert \ n ");
Printf (" 3: delete \ n ");
Printf (" 0: return \ n ");
Printf (" input (0-3) : \ n ");
The scanf (" % d ", & amp; G);
The switch (g)
{
Case 1:
Printf (" \ n please enter a name to find: \ n ");
scanf("%s",name);
K=Search_name (H, name);
Printf (" to find the person's information is: \ n ");
Has the person's name is: printf (" % s \ n ", H [k]. Name);
Has the person's phone number is: printf (" % s \ n ", H [k]. Num);
Has the person's address is: printf (" % s \ n ", H [k]. Add);
break;
Case 2:
Printf (" \ n please enter to insert information: \ n ");
Printf (" insert name is: ");
The scanf (" % s ", a0);
Printf (" insert phone number is: ");
The scanf (" % s ", b0);
Printf (" insert address is: ");
The scanf (" % s ", c0);
Insert_name (H, a0, b0, c0);
Results: after the printf (" insert \ n ");
Print_name (H);
break;
Case 3:
Printf (" please enter a name to be deleted: \ n ");
scanf("%s",name);
Del_name (H, name);
Information: after deleting the printf (" \ n ");
Print_name (H);
break;
Case 0:
Flag=1;
break;
}
If (flag==1)
break;
}
for(i=0; i<30; I++)//the hash table to empty
{
Strcpy (H [I]. Add, "\ 0");
Strcpy (H [I]. Num, "\ 0");
Strcpy (H [I]. The name, "\ 0");
}
break;
printf("\n");
Case 3:
Input_num (Inf, m, H);//phone number as the keyword to create the hash table
Print_num (H);
While (1)
{
Flag=0;
printf("\n");
Printf (" 1: search \ n ");
Printf (" 2: insert \ n ");
Printf (" 3: delete \ n ");
Printf (" 0: return \ n ");
Printf (" input (0-3) : \ n ");
The scanf (" % d, & amp; G ");
The switch (g);
{
Case 1:
Printf (" input to find number: \ n ");
The scanf (" % s, num ");
W=Search_num (H, num);
Printf (" to find the person's information is: \ n ");
Has the person's name is: printf (" % s \ n ", H [w] name);
Has the person's phone number is: printf (" % s \ n ", H [w] num);
Has the person's address is: printf (" % s \ n ", H [w]. Add);
break;
Case 2:
Printf (" \ n please enter to insert information: \ n ");
Printf (" insert name is: ");
The scanf (" % s ", a1);
Printf (" insert phone number is: ");
The scanf (" % s ", b1);
Printf (" insert address is: ");
The scanf (" % s ", c1);
Insert_num (H, a1, b1, c1);
Results: after the printf (" insert \ n ");
Print_num (H);
break;
Case 3:
Printf (" please enter a number to be removed: ");
The scanf (" % s ", num);
Del_num (H, num);
Information: after deleting the printf (" \ n ");
Print_num (H);
break;
Case 0:
Flag=1;
break;
}
If (flag==1)
break;
}
for(i=0; i<30; I++)//the hash table to empty
{
Strcpy (H [I]. Add, "\ 0");
Strcpy (H [I]. Num, "\ 0");
Strcpy (H [I]. The name, "\ 0");
}
break;
Case 0:
Printf (" welcome to use! ");
exit(0);
break;
}
system("pause");
}
}
Display an Error: experiment. CPP [Error] duplicate case value
Experiment. CPP [Error] previously, informs here
how should solve?