diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-07-26 01:40:48 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-07-26 02:54:02 +0100 |
commit | 9769337a9275d6a46373ba8094c2e05eb389dbd5 (patch) | |
tree | 5750358642f28ae9c839a566146351f9d2c760bc /src | |
parent | cc51f78d107c1b4401b4092e30d8e35531d5b953 (diff) | |
download | cw_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.cpp | 14 |
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!"); |