struct contact
{
char name[20],email[20];
int hpnum;
}add;
int option;
int main (void)
{
system("cls");
printf("==========Welcome to Jeffery's Contact System Management==========\n");
printf("\t\t\tContact System Main Menu\n");
printf("[1] Create a New Contact\n");
printf("[2] Modified Existing Contact\n");
printf("[3] Delete Existing Contact\n");
printf("[4] Search Existing Contact\n");
printf("[5] Exit\n");
printf("Please enter one of your option.\n");
scanf("%d",option);
switch(option)
{
//add new contact
case 1:
printf("Contact Name: ");
scanf("%s",&add.name);
printf("\nHandphone Number: ");
scanf("%d",&add.hpnum);
printf("\nE-mail: ");
scanf("%s",add.email);
break;
}
getch();
}
这个编码有什么问题?我可以运行它,但一旦选择否。1、有错误。如果我的编码错误,请通知我。我还是个初学者,希望大家能帮帮我。