注册 登录
编程论坛 VC++/MFC

编译出现找不到的错误

bok002121 发布于 2013-01-30 21:36, 426 次点击
void save(Pointer head)                                                   /*  13  q7   保存          */
{
Pointer p7;
FILE *fp;
int flag=1;
p7=head;
fp=fopen("d:\\code\\list","w");
if(fp==NULL)
 {
printf("open file error,press any key to return\n");getchar();
 }
else
 {
while(p7)
  {
if(fwrite(p7,sizeof(BOOK),1,fp)==1)
{p7=p7->next;continue;}
else
{flag=0;break;}
  }
if(flag)
{printf("\nsave success,press any key to continue\n");getchar();}
else
{printf("\nsave error,press any key to continue\n");getchar();}
 }
}                                                                         /*  13  q7   END           */

错误提示:
declaration missing ;
missing };

void wrong()                                                           /* 2  错误函数   */
{
printf("\n\n   enter wrong,press any key to continue   \n");
getchar();
}                                                                      /* 2  END           */

这个说申请语法错误

怎么我看不出

5 回复
#2
yuccn2013-01-31 09:39
代码还有其他的吧,不止这么一点
#3
bok0021212013-01-31 10:15
回复 2楼 yuccn
只有本站会员才能查看附件,请 登录
嗯嗯....
能从这3句话中知道要往哪里找错误码?
declaration syntax error
declaration missing ;
compoind statement missing

#4
yuccn2013-01-31 11:23
问题太多了,
一个函数一个函数的写吧
不要写好了在来找问题

问题
1 {和} 都不对应
2 错误使用宏。宏中的数据在函数内都没有定义,直接就用了宏
3 函数传参数个数不对

等等
#5
bok0021212013-01-31 12:30
宏中的数据,不是就可以直接用了吗......
#6
青春无限2013-02-01 03:13
看看
1