Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

_CRT_SECURE_NO_WARNINGS,error C4996, warning C4996?

$
0
0

Hi all,

In VS2012, when we create a new project and use memset,strcpy, we will get "error C4996: 'strcpy': This function or variable may be unsafe..." So we have to define _CRT_SECURE_NO_WARNINGS in the preprocessor.

However,I only get warning level message"warning C4996: 'strcpy': This function or variable may be unsafe..." ,when upgrading a project from vc6 to vc11 and the project uses strcpy. Obviously, the old project do not define _CRT_SECURE_NO_WARNINGS.

So would you please figure me out why the difference comes out?

Or, where and what sentence  has been done in the source code or configuration to let the cl complier know and give out different message?

Thanks in advance.


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>