/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) {
^~~~~