To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
If you do a #define _CRT_SECURE_NO_WARNING the warning is not disabled.
Notice the warning number is given
warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead.
C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\stdio.h(234) : see declaration of 'fopen'
So you can do
#pragma warning(disable: 4996)
// Disable "This function or variable may be unsafe." for fopen() and others
To disable it. This can be done anywhere but in the "stdafx.h" is
a good choice, if you have one.
You can also add it in C/C++ > Preprocessor > Preprocessor Definitions
but I prefer to have it in the code.