I’ve mostly programmed in C. If I make a binary tree class in C++, do I need to include a pointer to the root as a property so I can delete each node in the destructor or is it usually done another way? And do I need a constructor?
Other than that, I just have data, left, right, and the methods, correct?
You’ll want to be able to clean up after nodes if you allocate memory for them or you’ll have leaks.
I’d recommend the four horsemen of the apocolypse: constructor, destructor, copy constructor, and assignment operator.
I’d follow the example of the STL and create iterators: depth first, breadth first, etc.