我在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
我有什么遗漏吗?