‘fopen‘: This function or variable may be unsafe. Consider using fopen_s instead. To disable deprec

严重性    代码    说明    项目    文件    行    禁止显示状态 错误    C4996    fopen: This function or variable may be unsafe. Consider using

严重性    代码    说明    项目    文件    行    禁止显示状态
错误    C4996    'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.    test1    D:\app\wsCMake\test1\test1\test.cpp    8    

大致就是 此函数或变量可能不安全。 推见 改用fopen_s。 fopen要禁用弃用

把 fopen 改用 就OK了  
fopen_s(&file, "D:/app/hello.txt", "a");

 

参考

https://blog.csdn/lxy201700/article/details/16921629
https://blog.csdn/shary19860707/article/details/84854072

发布者:admin,转转请注明出处:http://www.yc00.com/web/1738336231a4038913.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信