【发布时间】:2011-04-27 18:47:49
【问题描述】:
我在 Ubuntu 中使用 g++
g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3
我有这个代码
#include<unordered_map>
using namespace std;
bool ifunique(char *s){
unordered_map<char,bool> h;
if(s== NULL){
return true;
}
while(*s){
if(h.find(*s) != h.end()){
return false;
}
h.insert(*s,true);
s++;
}
return false;
}
当我使用
编译时g++ mycode.cc
我有错误
error: 'unordered_map' was not declared in this scope
我错过了什么吗?
【问题讨论】:
标签: c++ hashtable unordered-map