btnode2.h
来自「一本全面剖析C++数据结构算法的书籍」· C头文件 代码 · 共 29 行
H
29 行
#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 + =
减小字号Ctrl + -
显示快捷键?