最近按照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. Yii框架怎么寻找对应视图

    render()内容; public function render($view,$data=null,$return=false) { if($this->beforeRender($view ...

  2. 02 java内存模型

    java内存模型 1.JVM内存区域 方法区:类信息.常量.static.JIT (信息共享) java堆:实例对象 GC (信息共享) OOM VM stack:JAVA方法在运行的内存模型 (OO ...

  3. sudo在清理内存的时候报错

    运行下面语句清缓存时,报Permission denied错误:-bash: /proc/sys/vm/drop_caches: Permission denied sudo echo 1 > ...

  4. 20180305-Python中迭代器和生成器

    一.迭代器 迭代器是访问集合元素的一种方式.迭代器从访问到集合的第一个元素开始访问,直到所有元素被访问结束.而且迭代器只能往前访问,不能后退.另外迭代器的另一个优点,不会事先准备好访问的集合的所有元素 ...

  5. Introduction to Sound Programming with ALSA

    ALSA stands for the Advanced Linux Sound Architecture. It consists of a set of kernel drivers, an ap ...

  6. find命令使用详解

    一.主要内容 ====================================== 1. 用文件名查找文件 2.用文件名查找文件,忽略大小写 3. 使用mindepth和maxdepth限定搜 ...

  7. postgresql绿色版安装及Navicat创建数据库,导入导出sql

    转载:https://www.cnblogs.com/winkey4986/p/5360551.html 1.设置安装路径为:D:\soft\pgsql,数据存储路径为:D:\soft\pgsql\d ...

  8. Jmeter —— Test Fragment (测试片段)

    Test Fragment(测试片段) 1.    概念 JMeter中的Test Fragent:是控制器上一种特殊的线程组:它在测试树上与线程组处于同一个层级.但是使用的时候需要和Include ...

  9. python爬虫 1.自己定义类实现scrapy框架的基本功能

    1.定义调度器,引擎,下载器,爬虫器,管道器 # 调度器,下载器,爬虫器,引擎,管道类 class Scheduler(): """调度器类""&qu ...

  10. 【leetcode】892. Surface Area of 3D Shapes

    题目如下: 解题思路:对于v = grid[i][j],其表面积为s = 2 + v*4 .接下来只要在判断其相邻四个方向有没有放置立方体,有的话减去重合的面积即可. 代码如下: class Solu ...