首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

gcc 4.1.2 使用 #include <hash_地图> 提示不存在

2013-11-29 
gcc 4.1.2 使用 #include hash_map 提示不存在gcc 4.1.2 使用 #include hash_map 提示不存在 使用 #in

gcc 4.1.2 使用 #include <hash_map> 提示不存在
gcc 4.1.2 使用 #include <hash_map> 提示不存在


 使用 #include <hash_map.h>  又警告我
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.


怎么弄?

LINUX系统 CENTOS 5.6
[解决办法]
看看有<unordered_map>吗?
[解决办法]
警告而已,g++ main.cpp -Wno-deprecated 就可以了。

引用:
gcc 4.1.2 使用 #include <hash_map> 提示不存在


 使用 #include <hash_map.h>  又警告我
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.


怎么弄?

LINUX系统 CENTOS 5.6

[解决办法]
update the gcc to later version
[解决办法]
#include <ext/hash_map> 
[解决办法]
hash_map不是stl的一部分, 因此在不同编译器下实现有差异, 可以试试
#ifdef __GNUC__
#include <ext/hash_map>
#else
#include <hash_map>
#endif


namespace std
{
using namespace __gnu_cxx;
}

热点排行