T
thomas.frendo
Hi,
I'm trying to store some elements of TinyXml in a 2d std::vector
here is my code
#include "stdafx.h"
#include "tinyxml.h"
#include <vector>
void write_simple( )
{
TiXmlDocument doc;
TiXmlDeclaration * decl = new TiXmlDeclaration( "1.0", "", "" );
doc.LinkEndChild( decl );
std::vector<std::vector<TiXmlElement*>> element;
element.push_back(std::vector<TiXmlElement*>(2));
element[0].push_back( new TiXmlElement( "Objet1" ));
/*TiXmlElement * param1 = new TiXmlElement( "Param1" );
element[0].push_back(param1);
element[0][0]->LinkEndChild( element[0][1]);*/
doc.LinkEndChild( element[0][0] );
doc.SaveFile( "madeByHand3.xml" );
}
int main(int argc, char* argv[])
{
write_simple();
return 0;
}
I'm trying to store some elements of TinyXml in a 2d std::vector
here is my code
#include "stdafx.h"
#include "tinyxml.h"
#include <vector>
void write_simple( )
{
TiXmlDocument doc;
TiXmlDeclaration * decl = new TiXmlDeclaration( "1.0", "", "" );
doc.LinkEndChild( decl );
std::vector<std::vector<TiXmlElement*>> element;
element.push_back(std::vector<TiXmlElement*>(2));
element[0].push_back( new TiXmlElement( "Objet1" ));
/*TiXmlElement * param1 = new TiXmlElement( "Param1" );
element[0].push_back(param1);
element[0][0]->LinkEndChild( element[0][1]);*/
doc.LinkEndChild( element[0][0] );
doc.SaveFile( "madeByHand3.xml" );
}
int main(int argc, char* argv[])
{
write_simple();
return 0;
}