warning: the 'gets' function is dangerous and should not be used.的解决办法
摘要:
在Linux下,使用gets(str)函数报错:warning: the 'gets' function is dangerous and should not be used.随便百度一下都能出现很多解决问题,都是让你换成fput(),换了之后那还是解决问题吗?如:解决办法:采用fgets(str,100,stdin);//100为size问题解决!问题是解决了,警告没有了,没有了正常好吗?你把函数给我换了,我gets()函数的警告你还是没给我解决,根本问题在于,linux、下gcc不支持gets()函数,step跟踪一下就能发现问题所在,那就是:gets从终端读入是的字符串 阅读全文
posted @ 2012-05-31 20:24 蒋少 阅读(2775) 评论(0) 推荐(0) 编辑