Smart pointers for modelling a general tree structure & its iterators?

Shared_ptr is total overkill: it's a tree so there is no shared ownership of nodes. Each node has a single owner: its parent.

For parent pointer: You have to ensure it always points to the actual parent in the setters for the children in parent, so adding an unset to the Treenode destructor is comparably simple. In which case dumb pointer will do.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions