Skip to content

Instantly share code, notes, and snippets.

@EvaGL
Last active December 29, 2015 08:09
Show Gist options
  • Select an option

  • Save EvaGL/7641423 to your computer and use it in GitHub Desktop.

Select an option

Save EvaGL/7641423 to your computer and use it in GitHub Desktop.
struct tree{
int meta[3];
int value;
tree *left;
tree *right;
tree() {
meta[0] = 2; //pointers count
meta[1] = sizeof(int) * 4; // offset to left
meta[2] = meta[1] + sizeof(tree*); // offset to right
.... // another initialization
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment