Welcome to W3Courses
 Like Us on Facebook

Creating Tree

C++ Source Code for Creating a Tree

Source code for creating a Tree in C++

typedef struct node
{
 struct node *left;
 struct node *right;
 data item;
 node(data x)
 {
  item=x;
  left=0;
  right=0;
 }
}tree_node;
typedef tree_node *link;

void visit(link t)
{
 cout<<t->item;
}

Share