⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 btnode2.h

📁 本文件为C++数据结构源代码
💻 H
字号:

#ifndef BinaryTreeNode_
#define BinaryTreeNode_

template <class T> class BinaryTree;
template<class E, class K> class BSTree;
template<class E, class K> class DBSTree;

template <class T>
class BinaryTreeNode {
   friend BinaryTree<T>;
   friend void PlaceBoosters(BinaryTreeNode<T> *);
   friend BSTree<T,int>;
   friend DBSTree<T,int>;
   public:
      BinaryTreeNode() {LeftChild = RightChild = 0;}
      BinaryTreeNode(const T& e)
            {data = e; LeftChild = RightChild = 0;}
      BinaryTreeNode(const T& e, BinaryTreeNode *l,
                     BinaryTreeNode *r)
       {data = e; LeftChild = l; RightChild = r;}
   private:
      T data;
      BinaryTreeNode<T> *LeftChild,  // left subtree
                        *RightChild; // right subtree
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -