首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

warning: the `gets' function is dangerous and should not be used

2012-10-06 
warning: the `gets function is dangerous and should not be used.gets()方法在linux下使用gcc编译时会

warning: the `gets' function is dangerous and should not be used.

gets()方法在linux下使用gcc编译时会出现下列问题:

#include <stdio.h>#include <string.h>int main(){        char s[80];        //fgets()函数的基本用法为:        //fgets(char * s,int size,FILE * stream);        fgets(s,80,stdin);//stdin表示键盘输入        fputs(s,stdout);//stdout表示输出        return 0;}
?

热点排行