binary search tree
<p>i am trying  to implement  binary search tree</p>

<pre><code> #include &lt;iostream&gt;
    using namespace std;
     class BST{
     private :
          int v,*n,vn;
          struct  node{
              int val;
              node *left,*right;
              node(int i){  val=i; left=right=0;}

          };

           node *root;


          node *rinsert( node *p,int t){


              if (p==0) {
                  p=new node(t);
                  n++;
              }
              else  if( t&lt;p-&gt;val){
                  p-&gt;left=rinsert(p-&gt;left,t);
              } else if (t&gt;p-&gt;val){
                  p-&gt;right=rinsert(p-&gt;right,t);
              }
               return p;

          }
          void traverse( node *p){

              if (p==0)
                   return ;
              traverse(p-&gt;left);
              v[vn++]=p-&gt;val;
              traverse(p-&gt;right);
          }





     public :
         BST(int maxlens,int maxval){ root=0; n=0;}
         int size() { return n;}
         void insert(int t){ root=rinsert(root,t);}
         void report(int *x) {v=x; vn=0; traverse(root);}

     };


     int main(){


          return 0;
     }
</code></pre>

<p>but this code has a few bugs  if  anybody run this code will see this bugs  please help me what is wrong in this code?</p>
