VS 错误----This function or variable may be unsafe.

来源:互联网 发布:mac版foxmail通讯录 编辑:程序博客网 时间:2024/05/16 15:11

在vs2015中使用strcpy函数的时候出现了这么个问题:

'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

解决方法很简单,只需要在该.cpp的最开始加上一句

#define _CRT_SECURE_NO_WARNINGS

ok,问题搞定。

0 0
原创粉丝点击