Problem is not with property_tree
, problem is, that you try store pointer to local variable in vector. You can save by value, or use some smart pointer (for example boost::shared_ptr
).
Problem:
void setItems(single_t Item){fItems.push_back(&Item);}
After exit from this function, local variable Item
will be destroyed, so you have dangling pointer.