Create treefrominandpre.cpp