문제

TiXmlElement * book = new TiXmlElement( "book" );  
    root->LinkEndChild( book );  
    string str1="name";
    const string str2=catalog[i].id();
    book->SetAttribute(str1,str2);

i get errors like [Error] no matching function for call to 'TiXmlElement::SetAttribute(std::string&, const string&)'

i need to set the attribute anyhow.

도움이 되었습니까?

해결책

Did you forget to #define TIXML_USE_STL?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top