We use CRT functions such as fopen in the program, there will be some warning message, very annoying, as follows:
Error C4996: ' fopen ': This function or variable could 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): Refer to "fopen" Statement <span style= "font-family: ' Microsoft Yahei '; White-space:pre-wrap; Background-color:rgb (255, 255, 255); " >:</span>
CRT functions (c Runtime Library = C Run-time libraries) are the extensions of Microsoft's C + + language. CRT functions are standard C-language functions. For example, functions such as printf, scanf, strlen, fopen, and so on, belong to CRT functions:
The quick solution is to include _crt_secure_no_warnings in the precompiled header, as follows:
And then the compilation was successful.
How to resolve error C4996: ' fopen ' problem