我们在程序中使用fopen等CRT函数,就会出现一些警告信息,很烦人,如下:
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. 1>f:\program files (x86)\microsoft visual studio 12.0\vc\include\stdio.h(211) : 参见“fopen”的声明<span style="font-family: 'Microsoft YaHei'; white-space: pre-wrap; background-color: rgb(255, 255, 255);">:</span>
快速解决方方案为在预编译头中加入_CRT_SECURE_NO_WARNINGS,具体操作如下:
然后就是编译成功啦