// Node for binary search tree // // #ifndef NODE_H_ // #define NODE_H_ class Node { friend class Tree; // so Tree can access the private data private: long data; Node *left, *right; public: // need constructor }; // #endif // NODE_H_ // binary search tree // // #ifndef TREE_H_ // #define TREE_H_ // #include "Node.h" class Tree { private: Node *root; public: Tree() { root = nullptr; } void insert( long d); void print() const; }; // #endif // TREE_H_ // binary search tree // #include // #include "Tree.h" using namespace std; void Tree::insert( long d) { } void Tree::print() const { } // test binary search tree // #include // #include "Tree.h" using namespace std; int main() { Tree t; long x[] = { 13, 25, 20, 10, 12, 2, 31, 29, -1 }; for( int i = 0; x[i] > 0; ++i) t.insert(x[i]); t.print(); }