error: expected identifier before numeric constant

论坛 期权论坛 脚本     
匿名技术用户   2021-1-7 06:31   11   0

当有下列语句时将出现此状况

 printf("\n\t\tSales as percentage of inventory:\t\t%f".\
      100*((float)total_cars_sold[brand]/(float)
    cars_in_stock[brand]));

57:7: error: expected identifier before numeric constant


原因是\前的不是, 误写成了.


网上查了下还有相关 的也出现了此类问题:

http://hi.baidu.com/yesbaba/blog/item/a8df963613c96c350a55a95b.html

转载于:https://www.cnblogs.com/xpchenscoding/archive/2012/03/14/2785518.html

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:7942463
帖子:1588486
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP