Pointer to dom tree

CVRoss

New Member
I'm using TinyXml:\[code\]// DocumentPtr is shared pointer type for TiXmlDocumentDocumentPtr sceneDoc = DocumentPtr(new TiXmlDocument(xmlFile));sceneDoc->LoadFile();for (TiXmlElement *i = sceneDoc->FirstChild("Param")->ToElement(); i != nullptr; i = i->NextSiblingElement()){ // Save to some storage `i` pointer}\[/code\]In this code I'm walking through \[code\]Param\[/code\] tags inside the DOM tree and push each pointer into some vector. When cycle finishes the work I'm trying to access some pointer. It's not null but all operations causes segfault.Is stored in each iteration \[code\]i\[/code\] pointer alive after cycle? If not, how to store it right.
 
Back
Top