Create maintree.cpp