//	124##57##8##3#6##
int main()
{
    Tree* mytree = NULL;
    while(1) {
        Tree::CreateTree(mytree);
        cout<<"树的深度是:"<<Tree::getDepth(mytree)<<endl;
        cout<<"先序遍历"<<endl;
        mytree->PreOrderVisit(mytree);
        cout<<endl;
        cout<<"中序遍历"<<endl;
        mytree->InOrderVisit(mytree);
        cout<<endl;
        cout<<"后序遍历"<<endl;
        mytree->LastOrderVisit(mytree);
        cout<<endl;
        cout<<"层次遍历"<<endl;
        mytree->LevelOrderVisit();
        cout<<endl<<endl;
        cout<<"非递归先序遍历"<<endl;
        mytree->NoRecursivePreVisit();
        cout<<endl;
        cout<<"非递归中序遍历"<<endl;
        mytree->NoRecursiveInVisit();
        cout<<endl;
        cout<<"非递归后序遍历"<<endl;
        mytree->NoRecursiveLastVisit();
        for(char c='1'; c<'9'; c++)
            Tree::showParent(mytree,c);

        Tree::destroyTree(mytree);
        cout<<endl;
    }
    cin.get();
    return 0;
}