相关疑难解决方法(0)

通过头文件在GCC中禁用警告消息?

gets()在我的C代码中使用该函数.我的代码工作正常,但我收到一条警告信息

(.text+0xe6): warning: the `gets' function is dangerous and should not be used.
Run Code Online (Sandbox Code Playgroud)

我希望不会弹出此警告消息.有什么办法吗?

我想知道通过创建一个用于禁用某些警告的头文件可能存在这种可能性.或者在编译期间有任何选项可以满足我的目的吗?或者可能有一种特殊的方法gets()用于此警告不要弹出?

c gcc warnings gets header

6
推荐指数
6
解决办法
1万
查看次数

标签 统计

c ×1

gcc ×1

gets ×1

header ×1

warnings ×1