我在 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
我错过了什么吗?