基本的に私は国のサブセットである(州、州コード)のペアを持っています [米国] - > [VT]std :: map <tstring <std :: map <tstring、unsigned int >>割り当てが失敗しました
32はので、私はstd::map<tstring<std::map<tstring, unsigned int>>
を使用していますが、私は状態コードの割り当てとのトラブルを抱えている
for(std::map<tstring, std::map<tstring, unsigned int>>::const_iterator it = countrylist.begin(); it != countrylist.end(); ++it)
{
foundCountry = !it->first.compare(_T("USA")); //find USA
if(foundCountry) it->second[_T("MN")] = 5; //Assignment fails
}
error C2678: binary '[' : no operator found which takes a left-hand operand of type 'const std::map<_Kty,_Ty>'
以前にSTLを使用しましたか? – user44511
あまりあまり明らかにそうではないので私は尋ねている。私はアマゾンから来たSTLの本を持っています。 – 0x4f3759df