VS2013编译程序出现error C4996: 'std::_Fill_n': Function call with parameters that may be unsafe
最近按照BiliBil网站Visual C++网络项目实战视频教程,使用VS2013编写一个基于MFC的对话框程序HttpSourceViewer,采用了WinHttp库、Boost xpressive正则库等,学到第23课,使用正则表达式时,出现如下错误:
错误 1 error C4996: 'std::_Fill_n': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct.
To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
d:\program files\microsoft visual studio 12.0\vc\include\xutility 2715 1 HttpSourceViewer
2 IntelliSense: 命令行错误: 宏定义无效: -D_SCL_SECURE_NO_WARNINGS
f:\SoftDevelop\CPlus\VCProject2013\HttpSourceViewer\HttpSourceViewer\RegExpBoost.cpp 1 1
HttpSourceViewer
google搜索error C4996: 'std::_Fill_n': Function call with parameters that may be unsafe
找到如下解决方案:
右键单击HttpSourceViewer项目,选择
属性-> c\c++ -> 预处理器 -> 预处理器定义 里添加
_SCL_SECURE_NO_WARNINGS 编译成功
参考资料:
1、【C++】错误 164 error C4996: 'std::_Fill_n':
VS2013编译程序出现error C4996: 'std::_Fill_n': Function call with parameters that may be unsafe的更多相关文章
- windows下编译caffe出现错误 C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe?
解决方案来自http://blog.csdn.net/u012556077/article/details/50353818
- error C4996: 'std::_Copy_impl'
以下代码段在VS2008编译可以通过,只是会提示不安全: std::vector<unsigned char> fileData ="asdfsfsfsfsdf";// ...
- Compiler Error: Function call with parameters that may be unsafe
如下的代码: #include <stdio.h> #include <string> #include <algorithm> #include <cass ...
- error C4996: Function call with parameters that may be unsafe – this call relies on the caller to ch
在加入QCustomplot时有如题的错误 1>c:\program files (x86)\microsoft visual studio11.0\vc\include\xutility(21 ...
- vs2013/2015中scanf函数类似于error C4996: 'scanf': This function or variable may be unsafe的安全检查错误
在使用vs2015时,遇到了scnaf函数安全性的问题,程序不能正常运行,错误如下: error C4996: 'scanf': This function or variable may be un ...
- 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 ...
- 解决VS2015中出现类似于error C4996: 'scanf': This function or variable may be unsafe的安全检查错误
用习惯了VS老版本的人当刚使用VS2013的时候可能总遇到类似于这样的错误: error C4996: 'scanf': This function or variable may be unsafe ...
- 配置OpenCV产生flann\logger.h(66): error C4996: 'fopen': This function or variable may be unsafe问题[zz]
使用vs2012/2013配置opencv编译出现问题: 1>------ 已启动生成: 项目: Win32ForOpenCV245, 配置: Debug Win32 ------ 1> ...
- error C4996: 'strcpy': This function or variable may be unsafe.
vs2012用strcpy遇到的错误. 错误描述:error C4996: 'strcpy': This function or variable may be unsafe. Consider us ...
随机推荐
- 16、NumPy ——字节交换
NumPy 字节交换 在几乎所有的机器上,多字节对象都被存储为连续的字节序列.字节顺序,是跨越多字节的程序对象的存储规则. 大端模式:指数据的高字节保存在内存的低地址中,而数据的低字节保存在内存的高地 ...
- node-sass 安装失败解决方法
使用淘宝镜像源 npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/ npm install node-s ...
- 20180105-Python中dict的使用方法
字典是Python中常用的内置数据类型之一. 字典是无序的对象集合,只能通过key-value的方式存取数据,字典是一种映射类型,其次key的必须是可hash的不可变类型.字典中的key必须唯一. 1 ...
- 转载一篇别人分享的VSFTPD.CONF的中文解释方便以后查询
# 服务器以standalong模式运行,这样可以进行下面的控制 listen=YES # 接受匿名用户 anonymous_enable=YES # 匿名用户login时不询问口令 no_anon_ ...
- Python Web开发:使用Django框架创建HolleWorld项目
开发环境搭建 Python环境安装 下载地址:https://www.python.org/downloads// Django安装 打开Windows CMD输入pip install django ...
- python常用函数 R
replace(str, str) 字符串替换. 例子: rjust(int) 格式化字符串,右对齐,支持传入填充值. 例子: rstrip(str) 删去右边的参数,支持传入参数. 例子: roun ...
- 从1<2<3的语法糖说起
python有一个很有意思的语法糖你可以直接写1<2<3. 这复合我们通常意义上的数学不等式,但对学过C等语言其实是有疑惑的. 我们知道不等式返回的其实是个Bool值,在C中是1,0因此C ...
- CS184.1X 计算机图形学导论(第五讲)
一.观察:正交投影 1.特性:保持平行线在投影后仍然是平行的 2.一个长方体,对处在只有深度不同的位置上的同一物体来说,它的大小不会改变. 3.透视投影:平行线在远处会相交(例如铁轨) 4.glOrt ...
- vue星级评分组件
<template> <div class="Rating-gray"> <i v-for="(item,index) in itemCla ...
- setInterval,setTimeout,clearInterval
定时器 var i=0; function iadd(){ i++; console.log(i) } setInterval(iadd,1000);//1.2.3... 超时调用 var i=0; ...