Advertisement
karlicoss

DAFUQ

Apr 11th, 2012
417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. nodes[curIndex].left = build(from, from + psize, depth + 1);
  2. nodes[curIndex].right = build(from + psize + 1, to, depth + 1);
  3. //^ causes segfault
  4.  
  5. int lf = build(from, from + psize, depth + 1);
  6. nodes[curIndex].left = lf;
  7. int rf = build(from + psize + 1, to, depth + 1);
  8. nodes[curIndex].right = rf;
  9. //^ works fine
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement