错误 C2143:语法错误:缺少“;” 前 '。'
错误 C4430:缺少类型说明符 - 假定为 int。注意:C 不支持 default-int 错误 C2371: 'TranslationMap' : redefinition; 不同的基本类型
static UString FindTranslatedString(UString propertyName);
static std::map<UString,UString> TranslationMap ;
static UString engString("TextAlignmentPosition");
static UString transString(MSGTXT("TextAlignmentPosition"));
TranslationMap.insert(std::pair<UString,UString>(transString,engString));
UString FindTranslatedString(UString propertyName)
{
UString NotFound("CannotFind");
std::map<UString, UString>::iterator itr;
itr = TranslationMap.find(propertyName);
if(itr!= TranslationMap.end())
{
return itr->second;
}
else
{
return NotFound;
}
}