fix BinaryTreeNode + generic
haxe3 fix
cpp: allocate array to n elements