add buildTree.cpp