首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

error C2065: 'end' : undeclared identifier解决办法

2012-04-26 
error C2065: end : undeclared identifierstruct book *search1(struct book *head){int numstruct bo

error C2065: 'end' : undeclared identifier
struct book *search1(struct book *head)
{
int num;
struct book *p1,*p2;
if(head==NULL) {printf("\nnull list \n");goto end;}
p1=head;
printf("输入查找的要查找的值:");
scanf("%d",num);
while(num!=p1->number && p1->next!=NULL)
{
p2=p1;p1=p1->next;
}
if(num==p1->number)
{
printf("found the book :%d,%s,%s,%s,%s,%d",p1->number,p1->name,p1->writter,p1->press,p1->time,p1->price );
}
else printf("%dnot been found \n",num);
end;
return(head);
}

error C2065: 'end' : undeclared identifier

这个错误是什么情况啊?不明白啊。。。。求解释

[解决办法]
else printf("%dnot been found \n",num);
end;
return(head);

不是分号,应该是 : 号吧
[解决办法]
end后面是冒号吧。
[解决办法]
end后面改成冒号
配合goto end; 使用
[解决办法]
end:

热点排行