Looks like you're not actually returning the value of your recursion call:
int findMinimumValue(struct tnode* node)
{
int min=node->data;
if(node->lchild==NULL)
{
return min;
}
else
{
// you need the return here or you're never returning
// anything in this branch
return findMinimumValue(node->lchild);
}
}
for that matter not really much need for the variable as it is, what about:
int findMinimumValue(struct tnode* node)
{
if (node->lchild == NULL)
return node->data;
else
return findMinimumValue(node->lchild);
}
oh, and just as a mention: I would consider using the non-recursive version of this instead; it's also pretty simple:
int findMinimumValue(struct tnode* node)
{
while (node->lchild != NULL)
node = node->lchild;
return node->data;
}
-Wall -Wextra; in VS you can use/W3or/W4.)