jimc
8
Ah, yes, you can sort of do that. It’s got a couple of issues you, it won’t write to XML properly:
Unless you really want it in an Array I’d be tempted to go with something like this:
for (auto i: originalArray)
{
ValueTree node{"n"};
n.setProperty("value", i, nullptr);
tree.addChild(node, -1, nullptr);
}
or similar which then gives you the option of writing to XML still. There may be reasons why Array would be better … someone else may have a view.