मैं जी ++ का उपयोग कर रहा उबंटूC++ unordered_map जी ++
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
क्या मुझे कुछ याद आ रही है?
त्रुटि काम करना चाहिए नहीं करना चाहते हैं: 'एसटीडी कॉल के लिए कोई मिलता-जुलता समारोह: : unordered_map, std :: equal_to , std :: allocator >> :: सम्मिलित करें (char &, bool) ' –
icn
@xlione: Can आप हमें कोड दिखाते हैं? ऐसा लगता है कि आप अपने मानचित्र में एक संदर्भ प्रकार डालने की कोशिश कर रहे हैं। – birryree
अपडेट किया गया, धन्यवाद – icn