/in/foo.cc: In function 'int main()':
/in/foo.cc:25:7: error: request for member 'data' in 'root', which is of pointer type 'BiNode*' (maybe you meant to use '->' ?)
root.data = num[0];
^~~~
/in/foo.cc: In function 'void Insert(int, BiNode*, int)':
/in/foo.cc:45:18: error: request for member 'data' in 'cur', which is of pointer type 'BiNode*' (maybe you meant to use '->' ?)
if (data >= cur.data)
^~~~
/in/foo.cc:48:17: error: request for member 'data' in 'cur->BiNode::rchild', which is of pointer type 'BiNode*' (maybe you meant to use '->' ?)
(cur->rchild).data = data;
^~~~
/in/foo.cc:47:11: warning: unused variable 'rchild' [-Wunused-variable]
BiNode* rchild = new BiNode;
^~~~~~
/in/foo.cc:53:17: error: request for member 'data' in 'cur->BiNode::lchild', which is of pointer type 'BiNode*' (maybe you meant to use '->' ?)
(cur->lchild).data = data;
^~~~
/in/foo.cc:52:11: warning: unused variable 'lchild' [-Wunused-variable]
BiNode* lchild = new BiNode;
^~~~~~