0
我試圖插入一對值成map
其被聲明爲否匹配部件功能:呼叫到std :: unordered_map ::刀片()
unordered_map <unsigned int, std::string> map;
和當我插入的2個string
S上的組合以和unsigned int
到map
:
map.insert(std::make_pair(count,str1.append(str2)));
和Xcode中說有「呼叫到‘插入’無匹配的成員函數」。我看着overload list,我不確定在這種情況下我應該使用哪一個。有人可以告訴我嗎?
更新:此問題是由unsuccesful typedef造成的。我現在改map
,並將其定義爲unordered_map<usigned int, string>
你沒有說任何關於'objects'以及如何'對象'與'string'有關。 – jogojapan
你有沒有'#include'? –
sithereal
@jogojapan對不起。 '對象'是'typedef'ed'std :: string' –