报错:error 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.


CRT函数(C Runtime Library = C运行时间库)函数,是微软公司对C/C++语言的扩展。CRT函数就是标准的C语言函数。例如,printf、scanf、strlen、fopen等函数就属于CRT函数。

解决方案为在预编译头中加入_CRT_SECURE_NO_WARNINGS

右击项目名>属性>c/c++>预处理器>预处理器定义>右侧向下的箭头>编辑

error C4996: 'fopen'问题

添加_CRT_SECURE_NO_WARNINGS

error C4996: 'fopen'问题

相关文章:

  • 2021-12-12
  • 2021-09-16
  • 2022-01-06
  • 2021-08-16
  • 2021-07-22
  • 2021-10-14
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-23
  • 2021-07-27
  • 2021-06-05
  • 2021-12-02
相关资源
相似解决方案