user-0 提问: 没有error 为啥不能运行？

回复:
user: user-1
content: 帮楼主稍微改了改  #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 3 struct telebook{ 	char num[4]; 	char name[10]; 	char phonenumber[15]; 	char email[20]; 	struct telebook *next; }; struct telebook *list=0; struct telebook *p=0; struct telebook *r=0; struct telebook *t=0; struct telebook *k=0; struct telebook *l=0; struct telebook *o=0; void inputrecord() { 	int i,j; 	list=NULL; 	for(i=0;i<N;i++) 	{ 		p=(struct telebook*)malloc(sizeof(struct telebook)); 		p->next=NULL; 		printf("num:"); 		printf("\n"); 		scanf("%s",p->num); 		printf("name:"); 		scanf("%s",p->name); 		printf("phonenumber:"); 		scanf("%s",p->phonenumber); 		printf("email:"); 		scanf("%s",p->email); 		if(list==NULL) 			list=p; 		else 			r->next=p; 		r=p; 		printf("确认输入下一个联系人？\n1.yes    2.no"); 		scanf("%d",&j); 		if(j==2) 			break; 	}  } void insertrecord() { 	p=(struct telebook*)malloc(sizeof(struct telebook)); 	p->next=NULL; 	printf("num:"); 	printf("\n"); 	scanf("%s",p->num); 	printf("name:"); 	scanf("%s",p->name); 	printf("phonenumber:"); 	scanf("%s",p->phonenumber); 	printf("email:"); 	scanf("%s",p->email); 	r->next=p; 	r=p; } void displayrecord() { 	for(t=list;t!=NULL;t=t->next) 	{ 		printf("%S   %s   %s   %s",t->num,t->name,t->phonenumber,t->email); 		printf("\n"); 	}  }  void deleterecord() { 	char num[10]; 	printf("please input the num you want to delete:"); 	scanf("%s",num); 	k=list; 	while(strcmp(num,(k->next)->num)!=0) 	{ 		k=k->next; 	} 	k=(k->next)->next; }  void searchrecord() { 	char name[10]; 	printf("please input the name you want to find:"); 	scanf("%s",name); 	l=list; 	while(strcmp(name,l->name)!=0) 	{ 		l=l->next; 	} 	printf("%s  %s  %s  %s",l->num,l->name,l->phonenumber,l->email); } void modifyrecord() { 	char name[10]; 	printf("input the name you want to modify:"); 	scanf("%s",name); 	o=list; 	while(strcmp(name,o->name)!=0) 	{ 		o=o->next; 	} 	printf("num:"); 	printf("\n"); 	scanf("%s",o->num); 	printf("name:"); 	scanf("%s",o->name); 	printf("phonenumber:"); 	scanf("%s",o->phonenumber); 	printf("email:"); 	scanf("%s",o->email); }  int main() { 	int j; 	void inputrecord(); 	void insertrecord(); 	void displayrecord(); 	void deleterecord(); 	void searchrecord(); 	void modifyrecord(); 	while(1) 	{ 		printf("************************The telephone --book Management System！");  		printf("\n"); 		printf("1.input record\n2.display record\n3.delete record\n4.search record\n5,insert record\n6.modify record\n"); 		printf("please choose:"); 		scanf("%d",&j); 		switch(j) 		{ 		case 1:inputrecord();break; 		case 2:displayrecord();break; 		case 3:deleterecord();break; 		case 4:searchrecord();break; 		case 5:insertrecord();break; 		case 6:modifyrecord();break; 		default:printf("wrong!"); 		}  	} }

user: user-1
content: 代码功能归根结底不是别人帮自己看或讲解或注释出来的；而是被自己静下心来花足够长的时间和精力亲自动手单步或设断点或对执行到某步获得的中间结果显示或写到日志文件中一步一步分析出来的。 提醒：再牛×的老师也无法代替学生自己领悟和上厕所！ 单步调试和设断点调试（VS IDE中编译连接通过以后，按F10或F11键单步执行，按Shift+F11退出当前函数；在某行按F9设断点后按F5执行停在该断点处。）是程序员必须掌握的技能之一。

user: user-2
content: p=(struct telebbook*)malloc(sizeof(struct telebook));前面的 telebbook和后面的 telebook都不一样的  char num[10]; 。。。  scanf("%s",num[10]);内的num[10]，不行的吧，已经越界了最大为num[9]吧

user: user-2
content: void inputrecord(); void insertrecord(); void displayrecord(); void deleterecord(); void searchrecord(); void modifyrecord(); 这些东西，似乎放外部的，调用的上面就行吧，不应放main内的

user: user-2
content: #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 3 struct telebook{ char num[4]; char name[10]; char phonenumber[15]; char email[20]; struct telebook *next; }; struct telebook *list=0; struct telebook *p=0; struct telebook *r=0; struct telebook *t=0; struct telebook *k=0; struct telebook *l=0; struct telebook *o=0; void inputrecord() { int i,j; list=NULL; for(i=0;i<N;i++) { p=(struct telebook*)malloc(sizeof(struct telebook)); p->next=NULL; printf("num:"); printf("\n"); scanf("%s",p->num); printf("name:"); scanf("%s",p->name); printf("phonenumber:"); scanf("%s",p->phonenumber); printf("email:"); scanf("%s",p->email); if(list==NULL) list=p; else r->next=p; r=p; printf("确认输入下一个联系人？\n1.yes    2.no"); scanf("%d",&j); if(j==2) break; }  } void insertrecord() { p=(struct telebook*)malloc(sizeof(struct telebook)); p->next=NULL; printf("num:"); printf("\n"); scanf("%s",p->num); printf("name:"); scanf("%s",p->name); printf("phonenumber:"); scanf("%s",p->phonenumber); printf("email:"); scanf("%s",p->email); r->next=p; r=p; } void displayrecord() { for(t=list;t!=NULL;t=t->next) { printf("%S   %s   %s   %s",t->num,t->name,t->phonenumber,t->email); printf("\n"); }   }   void deleterecord()  {     char num[100];     printf("please input the num you want to delete:");     scanf("%s",num[10]);     k=list;      while(strcmp(&num[10],(k->next)->num)!=0)      {         k=k->next;  }  k=(k->next)->next;  }    void searchrecord()  {  	char name[100];  	printf("please input the name you want to find:");  	scanf("%s",name[10]);  	l=list;      while(strcmp(&name[10],l->name)!=0)      {         l=l->next;  } printf("%s  %s  %s  %s",l->num,l->name,l->phonenumber,l->email);  }  void modifyrecord()  {  	char name[100];  printf("input the name you want to modify:");  scanf("%s",name[10]);  o=list;      while(strcmp(&name[10],o->name)!=0)      {         o=o->next;  }  printf("num:"); printf("\n"); scanf("%s",o->num); printf("name:"); scanf("%s",o->name); printf("phonenumber:"); scanf("%s",o->phonenumber); printf("email:"); scanf("%s",o->email);   }  void creatrecord() { 	return; }   int main()   {   	int j; void inputrecord(); void insertrecord(); void displayrecord(); void deleterecord(); void searchrecord(); void modifyrecord();   	while(1)   	{   	printf("************************The telephone --book Management System！");          printf("\n");         printf("1.input record\n2.display record\n3.delete record\n4.search record\n5,insert record\n6.modify record\n");   	printf("please choose:");   	scanf("%d",&j);   	switch(j)   	{   	case 1:creatrecord();break;   	case 2:displayrecord();break;   	case 3:deleterecord();break;   	case 4:searchrecord();break;   	case 5:insertrecord();break; case 6:modifyrecord();break; default:printf("wrong!");   }   	     } 	return 0;   }  ////初步改了下，这样才可以编译运行的，至于效果，还要改的哦

user: user-3
content: 编译时没有错误并不能保证运行时也没有错误，运行错误建议出错时断下通过调用堆栈、变量监视窗口等观察分析原因

user: user-0
content: 我其实不懂为啥Link会有问题，

user: user-0
content: 前面和后面的telebook为啥不一样啊

user: user-4
content: 没有error?为什么没有error，lz用的什么编译器。 好大的一个链接错误, creatrecord没有实现，甚至连申明都没有