读书人

warning: the `gets#039; function is dan

发布时间: 2012-10-06 17:34:01 作者: rapoo

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;}
?

读书人网 >编程

热点推荐