错误一例:expected expression before } token

简介: 错误一例:expected expression before } token

代码如下:

#if FLAG
if ()
{
      //语句A
}
else
#else
{
    //语句B
}
#endif

错误是#else引起的。

解决办法:

#if FLAG
if ()
{
      //语句A
}
else
{
    //语句B
}
#else
    //语句B
#endif

把else的代码重复一遍。

目录
相关文章
|
开发者
SyntaxError: cannot assign to literal错误
SyntaxError: cannot assign to literal错误
2325 1
错误代码: 1364 Field ‘password‘ doesn‘t have a default value
错误代码: 1364 Field ‘password‘ doesn‘t have a default value
报错 ValueError: too many values to unpack (expected 2)
报错 ValueError: too many values to unpack (expected 2)
216 0
错误一例:expected expression before } token
错误一例:expected expression before } token
224 0
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
472 0
解决办法:Type safety: The expression of type List needs unchecked conversion to conform
解决办法:Type safety: The expression of type List needs unchecked conversion to conform
336 0
【C】解决error: expected ‘;’ before ‘)’ token
【C】解决error: expected ‘;’ before ‘)’ token
|
关系型数据库 MySQL 数据库
当你遇到Error: ER_TRUNCATED_WRONG_VALUE_FOR_FIELD: Incorrect string value:
当你遇到Error: ER_TRUNCATED_WRONG_VALUE_FOR_FIELD: Incorrect string value:
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
248 0

热门文章

最新文章