aboutsummaryrefslogtreecommitdiff
path: root/btree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'btree.cpp')
-rw-r--r--btree.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/btree.cpp b/btree.cpp
index e5d412c..c22c297 100644
--- a/btree.cpp
+++ b/btree.cpp
@@ -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;
+ }
+};
+