//二叉树操作 #include "stdafx.h" #include<iostream> using namespace std; int num_visit=0;//记录输出元素个数 struct tnode{ public: int data; public: tnode *left,*right; tnode(){} tnode(int item,tnode *p,tnode *q):data(item),left(p),right(q){} }; typedef tnode *Tnode; …