Create sametree.cpp