小编net*_*mer的帖子

为什么不推荐使用gets()?

gets()在我的代码中使用时,编译器大喊

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

warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638)
[-Wdeprecated-declarations]
Run Code Online (Sandbox Code Playgroud)

有什么具体原因吗?

c c-strings include

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

标签 统计

c ×1

c-strings ×1

include ×1