BST implementation in c++ I wanted to study c++ so i took up algorithms.I have implemented a Binary search tree with insert,delete,inorder and minimum element functions.I would like to have some feedback and some pointers to do things better.Anything is appreciated.  

code:  

#include &lt;iostream&gt;
using namespace std;

//This represents my tree node
struct node{
    int value;
    node *left,*right;
};

//minimum value of bst
node* minValue(node* tnode){
    if(tnode-&gt;left!=NULL){
        return minValue(tnode-&gt;left);
    }
    else{
        return tnode;
    }

}

//Inorder traversal
void inorder(node *tnode){
    if(tnode-&gt;left!=NULL){
        inorder(tnode-&gt;left);
    }
    cout&lt;&lt;tnode-&gt;value;
    if(tnode-&gt;right!=NULL){
        inorder(tnode-&gt;right);
    }

}

//insert function
node* insert(int val,node *tnode){
    node *temp=tnode;
    if(temp==NULL){
        temp= new node;
        temp-&gt;value=val;
        temp-&gt;left=NULL;
        temp-&gt;right=NULL;
    }
    else if(val&lt;temp-&gt;value){
        temp-&gt;left=insert(val,temp-&gt;left);
    }
    else if(val&gt;temp-&gt;value){
        temp-&gt;right=insert(val,temp-&gt;right);
    }

    return temp;
}

//delete function
node* deleteNode(node* tnode,int val){

    if(tnode==NULL) 
        return tnode;
    if(tnode-&gt;value&gt;val){
        tnode-&gt;left=deleteNode(tnode-&gt;left,val);
    }
    else if(tnode-&gt;value&lt;val){
        tnode-&gt;right=deleteNode(tnode-&gt;right,val);
    }
    else{
        if(tnode-&gt;left==NULL){
            node* temp=tnode-&gt;right;
            delete tnode;
            return temp;
        }
        else if(tnode-&gt;right==NULL){
            node* temp=tnode-&gt;left;
            delete tnode;
            return temp;
        }
        node* temp=minValue(tnode-&gt;right);
        tnode-&gt;value=temp-&gt;value;       
        tnode-&gt;right=deleteNode(tnode-&gt;right,temp-&gt;value);
    }
    return tnode;

}
int main(){
cout&lt;&lt;"Binary Tree";
node *ROOT=NULL;
ROOT=insert(3,NULL);
insert(2,ROOT);
insert(5,ROOT);
insert(4,ROOT);
insert(1,ROOT);
insert(7,ROOT);
insert(8,ROOT);
deleteNode(ROOT,3);
inorder(ROOT);
return 0;
}
Design
Lets start by saying this is a C solution to the problem. You need to think more about classes encapsulation and protecting the tree from random coders to make sure your enviranrts remain protected.
Something like:
class BSTTree
{
    struct node { /* As you had */ };

    node*   root;
    public:
        // Constructors/Destructors and assignment here.

        void insert(int value);
        void delete(int value);
        void inorder(std::function&lt;void(int)&gt; action) const;
        int minimum() const;
};

Notice how we hide root to make sure only the methods you write can manipulate the tree. Nobody else can come along and tinker with it. This means if your code is correct then the enviranrts can not be changed.
Also you have not dealt with any of the issues around memory management. So you need to think about this. Who owns each node how are you going to delete them safely. Also  look up the rule of three before you write your class (implement that are the rule of zero).
Also you should probably avoid NULL it modern C++ it has been replaced by nullptr. The advantage of nullptr is that it has a well defined type that is not convertible to an integer type.
Code Review
Sure this works:
node* minValue(node* tnode){
    if(tnode-&gt;left!=NULL){
        return minValue(tnode-&gt;left);
    }
    else{
        return tnode;
    }    
}

Should you return a node? The function says min value. SO why not return the minimum value. Also you don't want to expose the implementation details and returning a node exposes these.
But is recursion the best way to handle this? Since you are simply traversing along a chain a simple loop seems much more effecient:
int minValue()
{
    if (root == nullptr) {
        throw std::runtime_exception(&quot;Blaaa&quot;);
    }
    node* last = root;
    for(;last-&gt;left; last = last-&gt;left) {
        /* Do nothing in the body */
    }
    return last-&gt;value;
}

The inorder() traversal works.
//Inorder traversal
void inorder(node *tnode){
    if(tnode-&gt;left!=NULL){
        inorder(tnode-&gt;left);
    }
    cout&lt;&lt;tnode-&gt;value;
    if(tnode-&gt;right!=NULL){
        inorder(tnode-&gt;right);
    }
}

But testing the left and right values before calling makes the code more difficult to read. More traditionally you test to see if the node is null before you start and simply return. Also you simply print the value. Why not pass a function that is called for each value that makes the traversal much ore interesting.
void inorder(std::function&lt;void(int)&gt; action) {
    doInorder(action, root);
}
void doInorder(std::function&lt;void(int)&gt; action, Node* node) {
    if (node == nullptr) {
        return;
    }
    doInorder(action, node-&gt;left);
    action(node-&gt;vallue);
    doInorder(action, node-&gt;right);
}

Then you can call the in-order with a function that prints each value.
tree.inorder([](int v){std::cout &lt;&lt; v &lt;&lt; &quot; &quot;;});

The insert function is basically correct.
//insert function
node* insert(int val,node *tnode){
    node *temp=tnode;
    if(temp==NULL){
        temp= new node;
        temp-&gt;value=val;
        temp-&gt;left=NULL;
        temp-&gt;right=NULL;
    }
    else if(val&lt;temp-&gt;value){
        temp-&gt;left=insert(val,temp-&gt;left);
    }
    else if(val&gt;temp-&gt;value){
        temp-&gt;right=insert(val,temp-&gt;right);
    }
    return temp;
}

The only difference I would do is make the new a single line.
temp= new node{val, nullptr, nullptr};

The delete node looks great.