I have a project for school and i can't get my void insert function to work
void insert(Tree *&Root, string crop, string framer, string color)
{
if (Root==NULL)
{
Root = new node;
Root->left = NULL;
Root->right = NULL;
Root->data = crop, farmer, color;
return;
}
else if (crop < Root->data)
{
insert(Root->left, crop, farmer, color);
}
else
{
insert(Root->right, crop, farmer, color);
}
}
I'm passing three types of info into one node of the tree.
the first one is the grain second is the farmer third is the crop color
Please help me. Thanx