我想访问我的map<wstring,wstring>
.
但这不起作用:
for (unsigned int i=0;i<m_ValidCharacterTranslations.Content().size();i++)
{
wstring wsFirst = &m_ValidCharacterTranslations.Content()[i]->first;
wstring wsSecond = &m_ValidCharacterTranslations.Content().at(i)->second;
//do something with these 2 wstrings
}
我在最后一行得到的错误是:
No binary operator accepts the right-handed operand of type 'unsigned int'.
我的班级是这样声明的:
clsTranslations m_ValidCharacterTranslations;
class clsTranslations : public CBaseStructure
{
private:
map<wstring,wstring> m_content;
protected:
virtual void ProcessTxtLine(string line);
public:
map<wstring,wstring> &Content();
void LoadTranslations(string file);
};
有人可以告诉我如何获得这些值吗?