// bstree.cpp
#include "bstree.h"

template<class type>
void insert_rec(node<type> *&ptr, type someitem)  // dereference the thing that ptr points to
{
	if (ptr == 0) ptr = new node<type>(someitem,0,0);
	else if (ptr->item > someitem) insert_rec(ptr->lptr,someitem);
	else insert_rec(ptr->rptr,someitem);
}

template<class type>
void bstree<type>::insert(type someitem)
{
	insert_rec(root_ptr,someitem);
}

template<class type>
bool search_rec(node<type> *&ptr)
{
	// We want to traverse the tree to search for duplicates
	// Return true if a duplicate is found; false otherwise
}

// Why do we have these functions outside ... something to do with root_ptr?


template<class type>
bool 	bstree<type>::search(type someitem)
{
	search_rec(root_ptr);
}

// ---------------------------------------------------------
