Linux包含hash_map和hash_set的not declared问题
来源:互联网 发布:心理学 网络教育 编辑:程序博客网 时间:2024/05/16 10:27
当在Linux下cpp文件包含hash_map或hash_set时,会出现"‘hash_map’ was not declared in this scope"问题。
#include <iostream>#include <string>#include <hash_map>using namespace std;int main(void){hash_map<int, string> hmap;hmap[1] = "hi hdu1";hmap[2] = "hi hdu2";hmap[3] = "hi hdu3";hash_map<int, string>::iterator iter;iter = hmap.find(2);if (iter != hmap.end()){cout << iter->second << endl;}else{cout << "not find" << endl;}return 0;}
#include <iostream>#include <string>#include <hash_map>using namespace std;using namespace __gnu_cxx;int main(void){hash_map<int, string> hmap;hmap[1] = "hi hdu1";hmap[2] = "hi hdu2";hmap[3] = "hi hdu3";hash_map<int, string>::iterator iter;iter = hmap.find(2);if (iter != hmap.end()){cout << iter->second << endl;}else{cout << "not find" << endl;}return 0;}
0 0
- Linux包含hash_map和hash_set的not declared问题
- hash_set, hash_map在linux下编译出现not declared的解决方法
- C++中hash_map和hash_set的用法
- hash_set和hash_map自定义数据类型的处理
- hash_set和hash_map
- 在windows 和 linux下引入hash_set、hash_map头文件
- 在windows 和 linux下引入hash_set、hash_map头文件
- 在windows 和 linux下引入hash_set、hash_map头文件
- ‘hash_map’ was not declared in this scope的解决方法
- 在windows 和 linux下引入hash_set、hash_map头文件(转)
- hash_set 在g++下编译出现not declare的问题
- ::system has not been declared 的问题
- hash_map 与 hash_set 详解
- hash_map hash_set命名空间
- hash_map 与 hash_set 详解
- hash_map 与 hash_set 详解
- hash_map 与 hash_set 详解
- hash_set,hash_map,hash_multiset,hash_multimap
- Android Studio App设置Activity背景图片
- SVN与GIT
- error C2440: “=”: 无法从“const char [11]”转换为“LPCWSTR”
- 自定义button
- 项目EasyUi和JS中遇到的问题总汇
- Linux包含hash_map和hash_set的not declared问题
- eclipse +maven+web应用 +tomcat jar包加载
- 【NOIP2001P/codevs1014】 装箱问题 解题报告
- 【洛谷】P1425 小鱼的游泳时间
- 第一章:机器学习基础
- Struts2学习笔记——02
- 机器学习资源
- Round Numbers(组合数学)
- Light oj 1251 - Forming the Council 【2-sat】【判断是否存在可行解 + 反向拓扑输出可行解】