C++: Ignore warnings C4996
jwenjian opened this issue · 0 comments
jwenjian commented
C4996 occurs when the compiler encounters a function or variable that is marked as deprecated by using a __declspec(deprecated) modifier, or when you attempt to access a function, class member or typedef that has the C++14 [[deprecated]] attribute.
To ignore the warnings, do in below ways:
- In cpp file
#pragma warning(disable : 4996)
-
In Commond line:
Using the/wd4996
command line option. -
In Visual Studio:
- Open the Property Pages dialog for your project. For information on how to use the Property Pages dialog, see Property Pages.
- Select the Configuration Properties, C/C++, Advanced page.
- Edit the Disable Specific Warnings property to add 4996. Choose OK to apply your changes.