最近按照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':

2、error C4996: Function call with parameters that may be unsafe – this call relies on the caller to check that the passed values are correct

VS2013编译程序出现error C4996: 'std::_Fill_n': Function call with parameters that may be unsafe的更多相关文章

  1. windows下编译caffe出现错误 C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe?

    解决方案来自http://blog.csdn.net/u012556077/article/details/50353818

  2. error C4996: 'std::_Copy_impl'

    以下代码段在VS2008编译可以通过,只是会提示不安全: std::vector<unsigned char> fileData ="asdfsfsfsfsdf";// ...

  3. Compiler Error: Function call with parameters that may be unsafe

    如下的代码: #include <stdio.h> #include <string> #include <algorithm> #include <cass ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. 解决VS2015中出现类似于error C4996: 'scanf': This function or variable may be unsafe的安全检查错误

    用习惯了VS老版本的人当刚使用VS2013的时候可能总遇到类似于这样的错误: error C4996: 'scanf': This function or variable may be unsafe ...

  8. 配置OpenCV产生flann\logger.h(66): error C4996: 'fopen': This function or variable may be unsafe问题[zz]

    使用vs2012/2013配置opencv编译出现问题: 1>------ 已启动生成: 项目: Win32ForOpenCV245, 配置: Debug Win32 ------ 1> ...

  9. error C4996: 'strcpy': This function or variable may be unsafe.

    vs2012用strcpy遇到的错误. 错误描述:error C4996: 'strcpy': This function or variable may be unsafe. Consider us ...

随机推荐

  1. hdu4352 XHXJ's LIS(数位dp)

    题目传送门 XHXJ's LIS Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) ...

  2. httpclient请求接口,上传文件附加参数(.net core)

    /// <summary> /// 上传文件 - 武汉站点 /// </summary> [HttpPost] public IActionResult UploadWH(Re ...

  3. JS小案例--全选和全不选列表功能的实现

    纯js代码实现列表全选和全不选的功能 <!DOCTYPE html> <html> <head lang="en"> <meta char ...

  4. 2019-9-2-win10-uwp-标题栏

    title author date CreateTime categories win10 uwp 标题栏 lindexi 2019-09-02 12:57:38 +0800 2018-2-13 17 ...

  5. Django学习笔记--数据库中的单表操作----增删改查

    1.Django数据库中的增删改查 1.添加表和字段 # 创建的表的名字为app的名称拼接类名 class User(models.Model): # id字段 自增 是主键 id = models. ...

  6. 4.VUE前端框架学习记录四:Vue组件化编码2

    VUE前端框架学习记录四:Vue组件化编码2文字信息没办法描述清楚,主要看编码Demo里面,有附带完整的代码下载地址,有需要的同学到脑图里面自取.脑图地址http://naotu.baidu.com/ ...

  7. zookeeper,通过python连接找出其对应的hive

    #通过zookpeer找到对应的hive from kazoo.client import KazooClient zkClient = KazooClient(hosts="ip1:218 ...

  8. python之chardet用来检测字符串编码的

    import chardet a=b'\xe4\xbd\xa0\xe5\xa5\xbd\xef\xbc\x8c\xe4\xb8\x96\xe7\x95\x8c\xe3\x80\x82'print(ch ...

  9. Vue-Cli 安装使用 moment.js

    1.npm install moment -- save 2.main.js 引入moment //定义全局 时间过滤器 S import Moment from 'moment'; Vue.filt ...

  10. C++ 概率算法 利用蒙特卡罗算法计算圆周率

    概率算法大致可分为4种形式: 数值概率算法: 蒙特卡罗算法: 拉斯维加斯算法: 舍伍德算法: 计算蒙特卡罗概率的算法实现: #include "stdio.h" #include ...