C语言错误----[Error] expected identifier or '(' before '{' token-----的解决方法。
2019-03-04 14:46
2501 查看
针对C语言中的一个报错的解决方法。
[Error] expected identifier or ‘(’ before ‘{’ token
解决方案:
主函数()的后面不能加分号,调用函数的()后面也不能加分号…
比如
**#incluede<stdio.h>
main()
{
int x,y,z;
scanf("%d,%d",&x,&y);
z=area(x,y);
printf(“area is %d\n”,z);
}
int area(int a,int b);
{
int c;
c=a*b;
return ©;
}**
上面的例子就会出现那样的结果,把int area(int a,int b)后面的分号去了 就对了!因为他是调用函数。
相关文章推荐
- error: expected ';', ',' or ')' before '&' token 解决方法
- 错误:error: expected class-name before '{' token解决方法
- bullet, iOS真机编译错误error: identifier or immediate expression expected解决方法
- C语言错误---【Error】expected declaration or statememt at end of input---解决方法。
- 在Ubuntu gcc下编译c程序,错误如下: test.c:3: error: expected ';', ',' or ')' before '&' token
- 关于【error: expected identifier before ‘,’ token】错误的检查
- vc++ classwizard "Parsing error:Number or identifier expected.Input line ....."错误解决
- C语言错误:error: expected ':', ',', ';', '}' or '__attribute__' before '=' tok 4000 en
- IE6,IE7,IE8下报JS错误:expected identifier, string or number的原因及解决的方法
- C语言--[Error]expected ')' before '[' token--以及--Error] label 's' used but not defined--的一个解决思路。
- C语言错误 [Error] expected declaration specifiers or '...' before 'student'
- expected identifier before ‘(’ token错误解决方式
- 安装PHP时 jpeglib.h:954: error:expected declaration specifiers or ‘...’ before ‘FILE’ 错误解决
- NDK编译错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
- IE6,IE7,IE8下报JS错误:expected identifier, string or number的原因及解决办法
- Android error: expected '=', ',', ';', 'asm' or '_attribute_' before '==' token
- android报Error:No resource identifier found for attribute 'roundIcon' in package 'android'错误解决方法
- codeblocks error: expected ';', ',' or ')' before '&' token| D:\CBworkpalc
- :expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token 解决办法
- 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token