Visual Studio解决freopen等函数报错函数安全问题
VS中使用freopen、fopen、sprintf等函数是会出现安全问题:
error C4996: 'xxxxx': This function or variable may be unsafe. Consider using xxxxxx instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
而报错。
解决方法
工程上右键,选择 属性->C/C++->预处理器,预处理器定义中加入一条:_CRT_SECURE_NO_WARNINGS,确认,问题解决。
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。