IF i have this function...
node* get_lowest(node* root)
{
node* min = root->child[0];
for(int i = 0; i<root->child.size();i++)
{
if(min > root->child[i])
min = root->child[i];
}
cout<<"Here it is:"<<min->data<<endl;
return min;
}
how do I get it to return the smallest indexed pointer?
for example if root->child[0] and root->child[1] exist how do I get root->child[0] to return?
return_object = get_lowest(root) ?