a.c:5:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wun

PTA做题时出现的错误,用if括起来就没有了。

    if(scanf("%d",&a)){};

其实并不是这里有问题,如果你的输出有问题,他就会鸡蛋里挑骨头的先显示这个错误。

posted @ 2018-04-15 10:44  路明天  阅读(4289)  评论(0编辑  收藏  举报