最近按照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. Identity MVC:UI

    基于原来做的cookie认证的代码:MvcCookieAuthSample 增加登陆和退出的方法: 增加Login和SignIn这两个Action方法. 在Views下面创建Account文件夹,然后 ...

  2. 自己实现一个类似 jQuery 的函数库

    假如我们有一个需求,需要给元素添加样式类,使用原生的JS很容易搞定. 1 抽取函数 function addClass(node, className){ node.classList.add(cla ...

  3. JVM(8)之 Stop The World

    开发十年,就只剩下这套架构体系了! >>>   小伙伴还记得上一篇中我们留下的一个问题吗?什么是停顿类型!经过前几章的学习,我们知道垃圾回收首先是要经过标记的.对象被标记后就会根据不 ...

  4. LeetCode 852. Peak Index in a Mountain Array(C++)

    Let's call an array A a mountain if the following properties hold: A.length >= 3 There exists som ...

  5. elasticsearch 基础 —— Update API

    Update API 更新API允许基于提供的脚本更新文档.该操作从索引获取文档(与分片并置),运行脚本(使用可选的脚本语言和参数),并对结果进行索引(也允许删除或忽略操作).它使用版本控制来确保在& ...

  6. vsftpd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT和vsftpd:500 OOPS: vsftpd: refusing to run with writable root inside chroot ()错误的解决方法

    今天在配置VSFTPD过程中遇到两个错误 1是启动失败,通过 SERVICE VSFTPD STATUS 查看到报错 May 02 16:06:58 debian systemd[1]: Starti ...

  7. docker运行模式图

    docker运行模式图:

  8. 7.搭建hyperledger fabric环境及启动——2019年12月12日

    2019年12月12日13:05:16 声明:从网络中学习整理实践而来. 1.介绍fabric Fabric 是一个面向企业应用的区块链框架,基于 Fabric 的开发可以粗略分为几个层面: 1. 参 ...

  9. Unit Testing of Classes in Java

    Every class can have a main method. That is a handy trick for unit testing of classes. For example, ...

  10. Linux用户登出之后保持后台进程(nohup)

    使用&可以将进程置于后台,但是用户从Shell登出之后,进程会自动结束.想要在登出之后保持进程运行,就要结合nohup命令使用. 例如: nohup find -size +100k > ...