warning C4995: 'wcscat': name was marked as #pragma deprecated

来源:互联网 发布:汉诺塔递归python语言 编辑:程序博客网 时间:2024/05/05 19:36

现象

#include <strsafe.h>
#include <boost/regex.hpp>
今天在使用这两个头文件是出现如下警告:


/microsoft visual studio 10.0/vc/include/intrin.h(1087): warning C4995: 'wcscat': name was marked as #pragma deprecated

意思就是警告你:"wcscat" 这个函数在接下去的版本将不会被支持,所以你需要使用替代的函数。

 

解决方法:

改变头文件引入顺序:

#include <boost/regex.hpp>
#include <strsafe.h>

 

PS: 当然你也可以直接屏蔽掉C4995警告。