My exercises for handling trees in C++