Friday, July 27, 2007 10:43 PMHi everyone,
How do you disable the deprecation check in VC++ Express Edition?
Below is what I'm trying to do:
warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
How/where do I use _CRT_SECURE_NO_WARNINGS ?
I'm looking into using strcpy_s at the moment, but I would like to know the method to disable the warning, just to learn.
Thanks in advance!!
Sunday, July 29, 2007 2:54 AMAllways happy to help a fellow wrestler...
Project properties->Configuration Properties->C/C++->Preprocessor->Preprocessor Definitions
Click on the elipses (...)
type any definitions you like separated by "\n"ie
enjoy the silence...
Sunday, July 29, 2007 5:34 AMCool!
Sunday, January 01, 2012 8:07 PM
By the way, to disable for just one file put this line before the line that causes the warning
If you want to turn off the POSIX deprecated warnings, put this line, too
#define _CRT_NONSTDC_NO_WARNINGSAnd, of course, you can put these lines in a header file, such as "Warnings.h" and include at the top of files which you do not want those warnings:#include "Warnings.h"
Ron Lewis at Indinfer, Baltimore, Maryland, United States
Tuesday, March 27, 2012 10:20 PM
#pragma warning(disable: 4996)
Sunday, March 10, 2013 1:25 AMThanks it work for me !