当前位置: 技术问答>linux和unix
linux g++编译器的问题
来源: 互联网 发布时间:2017-03-25
本文导语: 我想使用 stl 的hash_map ..但是他却提示我 #include using namespace __gnu_cxx; 警告: #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-d...
我想使用 stl 的hash_map ..但是他却提示我
#include
using namespace __gnu_cxx;
警告: #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. [-Wcpp]
啥米哦,老旧了? 那使用啥才是不老旧的呢?
#include
using namespace __gnu_cxx;
警告: #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. [-Wcpp]
啥米哦,老旧了? 那使用啥才是不老旧的呢?
|
这个已经是过去时了,C++11标准未出来前的过渡品.
现在C++11标准里已经定义了hash map.
在头文件中,命名空间是std;
介绍见:
http://www.cplusplus.com/reference/unordered_map/unordered_map/
linux g++编译时加上选项 -std=c++11即可