首页 > 技术文章 > 错误 1 error C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use . See online help for details.

predator-wang 2017-12-15 08:37 原文

出现这种警告的原因是因为我们没有使用安全的字符串处理函数。如果想屏蔽这种警告,可以使用:

还可以使用其它的方法,参考:

https://www.cnblogs.com/gb2013/archive/2013/03/05/SecurityEnhancementsInTheCRT.html

 

推荐阅读