error C4996: 'swprintf': swprintf has been changed to conform with the ISO C standard,set _CRT_NON_CONFORMING_SWPRINT
在VS2013上运行一个简单程序时,出现了error C4996: 'swprintf': swprintf has been changed to conform with the ISO C standard, adding an extra character count parameter. To use traditional Microsoft swprintf, set _CRT_NON_CONFORMING_SWPRINTFS.的错误。由错误信息可以知道swprintf函数的问题,在MSDN上查询得到该函数的申明
int swprintf(
wchar_t *buffer,
size_t count,
const wchar_t *format [,
argument]...
);
且有下面这段话:
“swprintf 符合 ISO C 标准,需要 size_t 类型的第二个参数,即count。 若要强制进行早期非标准行为,请定义_CRT_NON_CONFORMING_SWPRINTFS。 在将来的版本中,旧行为可能移除,因此,应更改代码以使用新的一致性行为。”
在原来出错语句:swprintf(szTip, _T("计时:%d"), i);
修改为:swprintf(szTip, 100,_T("计时:%d"), i);
即添加了count参数后就正确了。
error C4996: 'swprintf': swprintf has been changed to conform with the ISO C standard,set _CRT_NON_CONFORMING_SWPRINT的更多相关文章
- swprintf has been changed to conform with the ISO C standard, adding an extra character count parameter.
'swprintf': swprintf has been changed to conform with the ISO C standard, adding an extra character ...
- vs2012 error c4996: This function or variable may be unsafe
编译lua源码时,使用vs2012,遇到如下错误. 1>------ 已启动生成: 项目: 20130925, 配置: Debug Win32 ------ 1> stdafx.cpp ...
- 配置OpenCV产生flann\logger.h(66): error C4996: 'fopen': This function or variable may be unsafe问题[zz]
使用vs2012/2013配置opencv编译出现问题: 1>------ 已启动生成: 项目: Win32ForOpenCV245, 配置: Debug Win32 ------ 1> ...
- 1 error C4996: 'pcl::SAC_SAMPLE_SIZE':
使用PCL1.8 中使用粗配准拼接 错误 1 error C4996: 'pcl::SAC_SAMPLE_SIZE': This map is deprecated and is kept onl ...
- error C4996: 'fopen': This function or variable may be unsafe.
vs2013中错误提示信息: error C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s ...
- VS2013-解决error C4996: 'fopen'问题
VS2013中如何解决error C4996: 'fopen'问题 初次使用vs系列编辑器编写控制台应用程序时常出现如下错误: error C4996: 'fopen': This function ...
- 【转】VS2013中如何解决error C4996: 'fopen'问题
原文网址:http://jingyan.baidu.com/article/ce436649fd61543773afd32e.html 今天编写控制台应用程序时出现如下错误 error C4996: ...
- error C4996 The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name
error C4996: 'strupr': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ co ...
- error C4996: 'strcpy': This function or variable may be unsafe.
vs2012用strcpy遇到的错误. 错误描述:error C4996: 'strcpy': This function or variable may be unsafe. Consider us ...
随机推荐
- 【转】Jqgrid学习之ColModel API
ColModel 是jqGrid里最重要的一个属性,设置表格列的属性. 属性 数据类型 备注 默认值 align string left, center, right. left classes st ...
- angular : ng-animate : ng-show 原理,详解
这是我第一次写博客,请大家多多指教^^ 拷贝试试 <!DOCTYPE html> <html> <head> <meta http-equiv="C ...
- KEEP!
[list][*]别问我前端有没有前途,我不知道,我只知道我现在喜欢前端,以后也应该喜欢.[*]别问我前端的工作好不好找,不管哪一职位,工作好不好找都是看你的水平.[*]别问我前端累不累,这世界就没有 ...
- 关于CSS各种选择器,还有各种引入样式表的区别,import导入样式表,在介绍一些伪类选择器
(一)CSS选择器: 1.标签选择器:通过HTML的标签名直接选择该标签 2.类选择器:通过.选择器的名称{} 来对添加了class属性的标签进行选中 3.ID选择器:通过#选择器的名称{} 来对添加 ...
- 剑指offer编程题Java实现——面试题12打印1到最大的n位数
题目:打印1到最大的n位数 输入数字n,按顺序打印输出从1到最大的n位十进制数,比如输入3,打印从1到999. 这道题考察的地方是如何表示大数问题.由于n是任意大的数组,如果n太大的话n位数就超过了l ...
- JNI之C初探
JNI是Java Native Interface的缩写,从Java1.1开始,JNI标准成为java平台的一部分,它允许Java代码和其他语言写的代码进行交互.JNI一开始是为了本地已编译语言,尤其 ...
- LoadRunner如何进行移动端性能测试
1.录制脚本 1.1 创建脚本:新建一个用户脚本,选择Mobile Application 使用管理员身份打开VirtualUser Generator,点击[文件]->[新建脚本和解决方案], ...
- 1935: [Shoi2007]Tree 园丁的烦恼
1935: [Shoi2007]Tree 园丁的烦恼 Time Limit: 15 Sec Memory Limit: 357 MBSubmit: 648 Solved: 273[Submit][ ...
- 3016: [Usaco2012 Nov]Clumsy Cows
3016: [Usaco2012 Nov]Clumsy Cows Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 91 Solved: 69[Submi ...
- 好多鱼 Java
牛客网的题目: 链接:https://www.nowcoder.com/questionTerminal/e3dd485dd23a42899228305658457927牛牛有一个鱼缸.鱼缸里面已经有 ...