void Btree<T>::InsertNode2(T data, BtreeNode* root)
{
if (root==NULL)
{
root = new BtreeNode (data);
return ;
}
if (data <= root->data)
InsertNode2(data, root->leftchild);
else
InsertNode2(data, root->rightchild);
}
Why isn't it right? The root can't be assigned correctly. After calling the function it's still NULL.