2D-tree custom implementation in c++