Friday, February 12, 2016

Fix _CRT_SECURE_NO_WARNINGS in VC++

Error:

To disable deprecation, use _CRT_SECURE_NO_WARNINGS.

Error    1    error C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

Error    1    error C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

Solution:


Go to Project -> Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions and add _CRT_SECURE_NO_WARNINGS in the list.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.