Hi, I am trying to construct a binary tree using a list.
class Element
{
private:
list<Element*> _children;
char* _name;
//...other data members and methods
}
I have a class ("Element") that has children ("_children"), but I cannot figure out how to add children to the elements of "_children".
I can only use the "const_iterator" because when calling "_children.begin()" returns a const_iterator.
Can someone tell me how I can modify the values in a list?
Thank you.