想●致

c语言中遇到“警告: the `gets' function is dangerous and should not be used.”的解决办法

写于2016年12月1日。

在用c的库函数gets(str)时,编译出现该提示。原因在于linux下gcc不支持gets命令,要换成fgets(arr,size,stdin)。

posted @ 2016-12-01 14:36  相心  阅读(1918)  评论(0编辑  收藏  举报