aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-07-26 01:40:48 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-07-26 02:54:02 +0100
commit9769337a9275d6a46373ba8094c2e05eb389dbd5 (patch)
tree5750358642f28ae9c839a566146351f9d2c760bc /src
parentcc51f78d107c1b4401b4092e30d8e35531d5b953 (diff)
downloadcw_tree-9769337a9275d6a46373ba8094c2e05eb389dbd5.tar.gz
cw_tree-9769337a9275d6a46373ba8094c2e05eb389dbd5.tar.bz2
cw_tree-9769337a9275d6a46373ba8094c2e05eb389dbd5.zip
Binary tree of fractions
Will be used in creating the cw tree.
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 3613709..680a69b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -19,6 +19,7 @@
#include <sstream>
#include <string>
+#include <vector>
#define MIN(A, B) ((A) < (B) ? (A) : (B))
#define MAX(A, B) ((A) > (B) ? (A) : (B))
@@ -73,6 +74,19 @@ struct Fraction
}
};
+struct Node
+{
+ Fraction value;
+ Node *left, *right;
+
+ Node(Fraction val, Node *left = nullptr, Node *right = nullptr)
+ : value{val}, left{left}, right{right}
+ {
+ }
+};
+
+std::vector<Node> nodes;
+
int main(void)
{
puts("Hello, world!");