Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct node
- {
- char* label;
- struct node* child;
- int num_parents;
- struct node* parents[];
- }*Node;
- typedef struct tree
- {
- Node root;
- struct tree* next;
- }*Tree;
- Tree init()
- {
- Tree t;
- Node root;
- t = (Tree) malloc(sizeof(struct tree));
- root = (Node) malloc(sizeof(struct node));
- root->label = (char*) malloc(10*sizeof(char));
- root->label = "radacina";
- root->child = NULL;
- root->num_parents = 0;
- t->root = root;
- t->next = NULL;
- return t;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement