C++使用hash_map时警告
来源:互联网 发布:决战武林炮弩进阶数据 编辑:程序博客网 时间:2024/06/05 15:14
转自:http://www.2cto.com/kf/201304/201711.html
在C++中使用hash_map时,警告如下:
[html]
。。。。。。。。。。。。。
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/backward/backward_warning.h:28:2: 警告:#warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
。。。。。。。。。。。。。。
。。。。。。。。。。。。。
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/backward/backward_warning.h:28:2: 警告:#warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
。。。。。。。。。。。。。。
如果使用的话,还有报错。
报错与警告的解决方案:
[html]
set(CMAKE_CXX_FLAGS "-std=c++0x -Wno-deprecated")
set(CMAKE_CXX_FLAGS "-std=c++0x -Wno-deprecated")
就是在CXX_FLAGS中添加-std=c++0x 以及 -Wno-deprecated这两个选项
这两个选项的意思:c++0x是新的C++意思。而-Wno-deprecated是表示 no-deprecated这类警告忽略。
- C++使用hash_map时警告
- C++使用hash_map时警告
- C++使用hash_map时警告(backward_warning.h:28:)
- c++hash_map
- hash_map 使用
- 【C++】STL的hash_map
- c++hash_map详解
- 一个hash_map使用错误
- STL hash_map使用
- STL hash_map使用
- hash_map的使用
- GCC中使用hash_map
- STL hash_map使用
- hash_map的使用备忘
- STL hash_map使用
- hash_map 的使用
- STL hash_map使用
- STL hash_map使用
- neerc2006 细胞自动机
- Effective C++学习笔记_条款42:了解typename的双重意义
- codeforces 710E Generate a String(基础DP)
- 在自己博客上添加自己的“微博”栏目
- Android 拖动组件
- C++使用hash_map时警告
- 百度地图在设置中心时,背景变白
- python 科学计算库 - Numpy,Scipy,Pandas
- C# Java间进行RSA加密解密交互 .
- 洛谷 P1108 低价购买
- “J.U.C”:ReentrantLock之三unlock方法分析(r)
- HDU3792---Twin Prime Conjecture(树状数组)
- app/android:showAsAction的区别
- 基础(1)