#include "BinaryTree.h" #include using namespace std; int main() { BinaryTree mytree; mytree.createRoot(12); BinaryTree::Iterator it = mytree.root(); mytree.draw("tree",0,true); mytree.insertAsLeftChild(5, it); mytree.insertAsRightChild(22, it); it = it.left(); mytree.insertAsLeftChild(1, it); mytree.insertAsRightChild(9, it); mytree.draw("tree",&it,true); mytree.pivot(it); mytree.draw("tree",&it,true); }