您的位置:首页 > 其它

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

2017-04-21 10:21 246 查看
按照书上的视频教程写下来,运行时出现错误 warning: the gets function is dangerous and should not be used.
原因暂时还不知道。解决方法就是将gets改成fgets
char* fgets(char *string, int length, FILE * stream);


具体的解释可以参考http://stackoverflow.com/questions/1694036/why-is-the-gets-function-so-dangerous-that-it-should-not-be-used
看完前三个评论就能明白了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐