Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef stree_h
- #define stree_h
- #include <string>
- class tree
- {
- public:
- tree();
- ~tree();
- void print();
- bool lookup();
- bool insert(std::string value);
- bool remove(std::string target);
- private:
- class Node
- {
- Node(std::string mString){mString = value; mLeft = NULL, mRight = NULL, mParrent = NULL;}
- std::string value;
- Node *mLeft;
- Node *mRight;
- Node *mParrent;
- ~Node(){delete mLeft; delete mRight;}
- };
- Node *mRoot;
- //bool lookup(string target, Node *root);
- bool insert(std::string value, Node *root);
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement