0

```
this code was error.please help me fix it
include <iostream>
include <conio.h>
include <algorithm>
using namespace std;
int a[]={1,5,7,4,9,8};
BST*binary_search_tree;
struct BST{
int value;
BST* left;
BST* right;
};
int search_bst(BST* node,int key){
if(node==NULL)
return -1;
if(key<node->value)
return search_bst(node->left,key);
if(key>node->value)
return search_bst(node->right,key);
else
return node->value;
}
void insert_bst(BST* &treeNode,BST* newNode){
if(treeNode==NULL)
treeNode=newNode;
else if (newNode->value<treeNode->value)
insert_bst(treeNode->left,newNode);
else
insert_bst(treeNode->right,newNode);
}
void inorder_bst(BST* tree){
if(tree==NULL)
return;
inorder_bst(tree->left);
cout<<tree->value<<" ";
inorder_bst(tree->right);
}
void binary_tree_sort(int a,int length){
BST item;
for(int i=0;i<length;i++){
item=new BST();
item->value=a[i];
insert_bst(binary_search_tree,item);}
inorder_bst(binary_search_tree);
}
int main()
{
binary_tree_sort(a,6);
return 0;
}
```