Advertisement
Guest User

Untitled

a guest
Feb 24th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1.       if(root->type == root->children[i]->type){
  2.         int numberOfChildren = root->n_children + root->children[i]->n_children;
  3.         root->children = realloc(root->children, sizeof(node_t)*(numberOfChildren));
  4.         if(root->children != NULL) {
  5.           for(int j = 0; j < root->children[i]->n_children; j++)
  6.             {
  7.               root->children[root->n_children-1+j] = root->children[i]->children[j];
  8.             }
  9.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement