VS 2005 Warning 小记
来源:互联网 发布:里皮的水平知乎 编辑:程序博客网 时间:2024/06/07 14:46
- warning C4996: “strcpy”被声明为否决的
1> d:/program files/microsoft visual studio 8/vc/include/string.h(73) : 参见“strcpy”的声明
1> 消息:“This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.”
原因:
如其所述,strcpy函数有安全隐患,strcpy_s函数可以有效的检测内存溢出现象。解决方法:
a)将strcpy改为strcpy_s
b)为了使代码更加的通用
添加编译选项:
项目属性 -> “配置属性” -> “C/C++” -> “命令行”,在右侧的“附加选项”
文本编辑框里加入 /D "_CRT_SECURE_NO_DEPRECATE"
- VS 2005 Warning 小记
- 关闭VS warning
- 屏蔽VS警告warning
- VS-Warning&Error处理
- VS warning C4819
- vs问题小记
- 关闭VS警告 warning C4996
- VS关闭没用的warning
- vs下warning MSB8012解决方案
- VS中解决warning C4819
- VS warning C4819 的解决方法
- 屏蔽不显示VS警告warning
- 去除VC VS警告:warning C4996
- VS中一些warning的消除
- VS编程问题-warning C4996: ’strdup’
- Windows 2000 vs XP/2003 测试小记
- vs Warning:This project is out of date
- Ogre1.81 VS下编译烦人的Warning解决办法
- 羌笛声声胡笳怨,此心长寄天涯远
- join
- Codeforces Round #136 (Div. 2) D. Little Elephant and Array
- the functional interface to the i2c busses.
- 单用户模式启动 修改root密码
- VS 2005 Warning 小记
- 用js使得输入框input只能输入数字
- TinyXML初学
- jQuery选择器中含有空格的注意事项
- 二叉树的遍历
- VC调试入门
- 正则表达式
- Linux编程常用的函数
- 伸长的守候