I have multiple classes to hold parts of information, the classes are related but the information is easier to handle in smaller chunks I don't seem to be able to allocate the element in one member function and attach it to the XML document or root element and have it persist after the function generating the tinyxml2::XMLElement exits; even if I pass a pointer to a pointer to the document class from the containing class. I have a somewhat minimal example but it is a code::blocks project with 8 files; I will try to generate a minimal example in 1 file; are the XMLElements on the stack? or are they heap elements?
Thanks, Mark.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have multiple classes to hold parts of information, the classes are related but the information is easier to handle in smaller chunks I don't seem to be able to allocate the element in one member function and attach it to the XML document or root element and have it persist after the function generating the tinyxml2::XMLElement exits; even if I pass a pointer to a pointer to the document class from the containing class. I have a somewhat minimal example but it is a code::blocks project with 8 files; I will try to generate a minimal example in 1 file; are the XMLElements on the stack? or are they heap elements?
Thanks, Mark.
Oh, it did work, but the printer element didn't reflect the change...interesting;