Guest User

Untitled

a guest
May 5th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include "Tree.h"
  2. #include<iostream>
  3. #include<string>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     BinaryTree* tree = new BinaryTree();
  10.     tree->Insert(4);
  11.     tree->Insert(42);
  12.     tree->Insert(21);
  13.     tree->Insert(31);
  14.     tree->Insert(14);
  15.     tree->Insert(12);
  16.     tree->Insert(3);
  17.     ofstream output("tree.txt");
  18.     tree->treeToFile(output);
  19.    
  20.  
  21.     delete tree;
  22.     return 0;
  23. }
Add Comment
Please, Sign In to add comment