_SCL_SECURE_NO_WARNINGS

Calling any one of the potentially unsafe methods in the Standard C++ Library will result in Compiler Warning (level 3) C4996. To disable this warning, define the macro _SCL_SECURE_NO_WARNINGS in your code:

#define _SCL_SECURE_NO_WARNINGS

Other ways to disable warning C4996 include:

Also, you can manually change the level of warning C4996 with the /w<l><n> compiler option. For example, to set warning C4996 to level 4:

cl /w44996 [other compiler options] myfile.cpp

For more information, see /w, /Wn, /WX, /Wall, /wln, /wdn, /wen, /won (Warning Level).

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft