记录详情

Compile Error

/in/foo.cc: In constructor 'node::node()':
/in/foo.cc:11:21: error: 'null' was not declared in this scope
   lchild = rchild = null;
                     ^~~~
/in/foo.cc: In constructor 'node::node(int)':
/in/foo.cc:15:21: error: 'null' was not declared in this scope
   lchild = rchild = null;
                     ^~~~
/in/foo.cc: In function 'void build(node&, int)':
/in/foo.cc:27:10: error: invalid user-defined conversion from 'node*' to 'node&' [-fpermissive]
  build(t.lchild, now + 1);
        ~~^~~~~~
/in/foo.cc:13:2: note: candidate is: node::node(int) <near match>
  node(int _val) {
  ^~~~
/in/foo.cc:13:2: note:   conversion of argument 1 would be ill-formed:
/in/foo.cc:27:10: error: invalid conversion from 'node*' to 'int' [-fpermissive]
  build(t.lchild, now + 1);
        ~~^~~~~~
/in/foo.cc:27:10: error: invalid conversion from 'node*' to 'int' [-fpermissive]
/in/foo.cc:13:2: note:   initializing argument 1 of 'node::node(int)'
  node(int _val) {
  ^~~~
/in/foo.cc:27:25: error: conversion to non-const reference type 'struct node&' from rvalue of type 'node' [-fpermissive]
  build(t.lchild, now + 1);
                         ^
/in/foo.cc:22:6: note:   initializing argument 1 of 'void build(node&, int)'
 void build(node &t, int now) {
      ^~~~~
/in/foo.cc:28:10: error: invalid user-defined conversion from 'node*' to 'node&' [-fpermissive]
  build(t.rchild, now + 1);
        ~~^~~~~~
/in/foo.cc:13:2: note: candidate is: node::node(int) <near match>
  node(int _val) {
  ^~~~
/in/foo.cc:13:2: note:   conversion of argument 1 would be ill-formed:
/in/foo.cc:28:10: error: invalid conversion from 'node*' to 'int' [-fpermissive]
  build(t.rchild, now + 1);
        ~~^~~~~~
/in/foo.cc:28:10: error: invalid conversion from 'node*' to 'int' [-fpermissive]
/in/foo.cc:13:2: note:   initializing argument 1 of 'node::node(int)'
  node(int _val) {
  ^~~~
/in/foo.cc:28:25: error: conversion to non-const reference type 'struct node&' from rvalue of type 'node' [-fpermissive]
  build(t.rchild, now + 1);
                         ^
/in/foo.cc:22:6: note:   initializing argument 1 of 'void build(node&, int)'
 void build(node &t, int now) {
      ^~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:34:12: error: too few arguments to function 'void build(node&, int)'
  build(root);
            ^
/in/foo.cc:22:6: note: declared here
 void build(node &t, int now) {
      ^~~~~

信息

递交者
类型
自测
题目
P1189 青牛将隐
语言
C++
递交时间
2020-12-09 15:03:35
评测时间
2020-12-09 15:03:35
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes