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

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

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

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

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务