Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Tree.h"
- #include<iostream>
- #include<string>
- using namespace std;
- int main()
- {
- BinaryTree* tree = new BinaryTree();
- tree->Insert(4);
- tree->Insert(42);
- tree->Insert(21);
- tree->Insert(31);
- tree->Insert(14);
- tree->Insert(12);
- tree->Insert(3);
- ofstream output("tree.txt");
- tree->treeToFile(output);
- delete tree;
- return 0;
- }
Add Comment
Please, Sign In to add comment