yes
inc/binTree.h@15:470dd4b66b6f, 2019-03-04 (annotated)
- Committer:
- schizzlewizzle
- Date:
- Mon Mar 04 17:07:58 2019 +0000
- Revision:
- 15:470dd4b66b6f
yeet
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
schizzlewizzle | 15:470dd4b66b6f | 1 | |
schizzlewizzle | 15:470dd4b66b6f | 2 | #include <string> |
schizzlewizzle | 15:470dd4b66b6f | 3 | |
schizzlewizzle | 15:470dd4b66b6f | 4 | using std::string; |
schizzlewizzle | 15:470dd4b66b6f | 5 | |
schizzlewizzle | 15:470dd4b66b6f | 6 | |
schizzlewizzle | 15:470dd4b66b6f | 7 | class binTree |
schizzlewizzle | 15:470dd4b66b6f | 8 | { |
schizzlewizzle | 15:470dd4b66b6f | 9 | |
schizzlewizzle | 15:470dd4b66b6f | 10 | public: |
schizzlewizzle | 15:470dd4b66b6f | 11 | //defining tree and values stored inside. |
schizzlewizzle | 15:470dd4b66b6f | 12 | struct node{ |
schizzlewizzle | 15:470dd4b66b6f | 13 | node* dot; |
schizzlewizzle | 15:470dd4b66b6f | 14 | node* dash; |
schizzlewizzle | 15:470dd4b66b6f | 15 | node *root; |
schizzlewizzle | 15:470dd4b66b6f | 16 | char inputC; |
schizzlewizzle | 15:470dd4b66b6f | 17 | string morse; |
schizzlewizzle | 15:470dd4b66b6f | 18 | }; |
schizzlewizzle | 15:470dd4b66b6f | 19 | node *root; |
schizzlewizzle | 15:470dd4b66b6f | 20 | |
schizzlewizzle | 15:470dd4b66b6f | 21 | binTree(); |
schizzlewizzle | 15:470dd4b66b6f | 22 | //functions for binary tree |
schizzlewizzle | 15:470dd4b66b6f | 23 | void insert(char inputC, string morse, node * root); |
schizzlewizzle | 15:470dd4b66b6f | 24 | /*binTree::node* search(string morse, node * leaf);*/ |
schizzlewizzle | 15:470dd4b66b6f | 25 | //binTree::node* search(string morse); |
schizzlewizzle | 15:470dd4b66b6f | 26 | void insert(char inputC, string morse); |
schizzlewizzle | 15:470dd4b66b6f | 27 | char tFind(node*, string morse); |
schizzlewizzle | 15:470dd4b66b6f | 28 | }; |
schizzlewizzle | 15:470dd4b66b6f | 29 |