BinNode.h
#ifndef BINNODE_H_MY
#define BINNODE_H_MY
template <typename T>
struct BinNode{
T data;
BinNode<T>* parent;
BinNode<T>* lChild;
BinNode<T>* rChild;
BinNode()
: parent(NULL),lChild(NULL),rChild(NULL){}
BinNode(T e, BinNode<T>* p = NULL, BinNode<T>* lc = NULL, BinNode<T>* rc = NULL)
: data(e), parent(p), lChild(lc), rChild(rc){}
BinNode<T>* insertASLC(T const&);//作为左孩子插入
BinNode<T>* insertASRC(T const&);//作为右孩子插入
bool operator==(BinNode const &bn){
return data==bn.data;}
bool operator<(BinNode const &bn){
return data<bn.data;}
};
template <typename T>
BinNode<