Pergunta

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.

Foi útil?

Solução

Did you forget to #define TIXML_USE_STL?

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top