diff options
Diffstat (limited to 'btree.cpp')
-rw-r--r-- | btree.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -4,3 +4,23 @@ */ +enum Order +{ + LT, + GT, + EQ +}; + +template <typename T> +struct BinaryTree +{ + T value; + BinaryTree<T> *left, *right; + enum Order (*compare)(T, T); + ~BinaryTree() + { + delete left; + delete right; + } +}; + |