user-0 提问: c语言问题求教

回复:
user: user-1
content: 加分号，加分号，加分号…… 说三遍~

user: user-2
content: void enter() void save() void list() int load() int add() void print() int find() int deleter() int menu_select()   这些声明后面都要以分号结尾

user: user-3
content: 开头的那一堆函数说明，后面都要带分号

user: user-0
content: 源代码 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<conio.h>  struct address { 	char name[20];     char email[20]; 	char cla[30]; 	char tele[20]; };  void enter() void save() void list() int load() int add() void print() int find() int deleter() int menu_select()  void main() { 	int intChoice,recordNum=0; 	struct address r[100]; 	while(1) 	{ 		intChoice=menu_select(); 		switch(intChoice) 		{ 		    case 0:recordNum=enter(r);save(r,recordNum);break; 	        case 1:recordNum=load(r);list(r,recordNum);break; 	        case 2:recordNum=load(r); 			recordNum=add(r,recordNum); 			save(r,recordNum); 			list(r,recordNum); 			break; 			case 3:recordNum=load(r); 			recordNum=deleter(r,recordNum); 			save(r,recordNum); 			list(r,recordNum); 			break; 			case 4:exit(0); 		} 	} }  int enter(address t[]) { 	int i,n; 	system("cls"); 	printf("请输入要录入的记录数:");     scanf("%d",&n); 	printf("请输入记录，记录的各项之间用空格分隔：\n"); 	printf("--------------------------创建通讯录---------------------------\n");     for(i=0;i<n;i++) 	{ 		scanf("%s %d %s %s",t[i].name,&t[i].email,t[i].cla,t[i].tele); 		printf("---------------------------------------------------------------\n"); 	} 	return n; }   void save(address t[],int n) { 	int i; 	FILE *fp; 	if(fp=fopen("record.txt","wb"))==NULL) 	{ 		printf("无法打开文件！\n"); 		exit(1); 	} 	fprintf(fp,"%d",n); 	fprintf(fp,"\r\n"); 	for(i=0;i<n;i++) 	{ 		fprintf(fp,"%-20s%-30d%-30s%10s",t[i].name,t[i].email,t[i].cla,t[i].tele); 		fprintf(fp,"\r\n"); 	} 	fclose(fp); }  void list(address t[],int n) { 	int i; 	system("cls");     printf("\n--------------------------通讯录---------------------------\n"); 	printf("姓名\t\t邮箱\t\t班级\t\t电话\n"); 	for(i=0;i<n;i++) 	{ 		printf("%-20s%-20d%-20s%10s\n",t[i].name,t[i].email,t[i].cla,t[i].tele); 		printf("---------------------------------------------------------------\n"); 	} 	if((i+1)%10==0) 	{ 		printf("请按任意键继续!\n"); 		getch(); 	} 	printf(--------------------------共计:%d条---------------------------\n",n);     printf("请按任意键返回主菜单!\n"); 	getch(); }  int load(address t[]) { 	int i,n; 	FILE*fp; 	if((fp=fopen("record.txt","rb"))==NULL) 		return 0; 	fscanf(fp,"%d",&n); 	for(i=0;i<n;i++) 		fscanf(fp,"%s %d %s %s",t[i].name,&t[i].email,t[i].cla,t[i].tele); 	fclose(fp); 	return n; }  int add(address t[],int n) { 	system("cls"); 	printf("请输入单条记录，记录的各项之间用空格分隔：\n"); 	printf("--------------------------添加通讯录---------------------------\n"); 	printf("姓名\t邮箱\t班级\t电话\n"); 	scanf("%s %d %s %s",t[i].name,&t[i].email,t[i].cla,t[i].tele); 	printf("---------------------------------------------------------------\n");     n++; 	return n; }  void print(addres temp) { 	system("cls"); 	printf("\n--------------------------详细信息---------------------------\n"); 	printf("姓名\t\t邮箱\t\t班级\t\t电话\n");     printf("%-20s%-20d%-20s%10s\n",t[i].name,t[i].email,t[i].cla,t[i].tele);     printf("---------------------------------------------------------------\n"); }  int find(address t[],int n,char*s) { 	int i; 	for(i=0;i<n;i++) 	{ 		if(strcmp(s,t[i].name)==0) 			return i; 	} 	return i; }  int deleter(address t[],int n) { 	char s[20]; 	char ch;; 	int i,j;     printf("请输入要删除的姓名:"); 	scanf("%s",s); 	i=find(t,n,s); 	if(i>n-1) 		printf("没有查找到要删除的记录!\n"); 	else  	{ 		printf(t[i]); 		printf ("请选择是否要删除):"); 		ch=getch();         if(ch==Y||ch==y) 		{ 			for(j=j+1;j<n;j++) 			{ 				strcpy(t[j-1].name,t[j].name); 				t[j-1].email=t[j].email; 				strcpy(t[j-1].cla,t[j].cla); 				strcpy(t[j-1].tele,t[j].tele); 			} 			n--; 		} 	} 	return n; }  int menu_select() { 	char s[80]; 	int c; 	system("cls"); 	printf("--------------------------欢迎使用通讯录---------------------------\n\n"); 	printf ("0.创建通讯录\n"); 	printf ("1.显示通讯录\n"); 	printf ("2.添加通讯录\n"); 	printf ("3.删除通讯录\n"); 	printf ("4.退出通讯录\n"); 	printf("---------------------------------------------------------------\n"); 	do 	{ 		printf("\n请输入你的选择:"); 		scanf("%s",s); 		c=atoi(s); 	} 	while(c<0||c>4); 	return c; }