记录详情

Compile Error

/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;
           ^~~~~~

信息

递交者
类型
自测
题目
战斗民族
语言
C++
递交时间
2019-01-24 08:31:03
评测时间
2019-01-24 08:31:03
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes