doll.cpp: In member function 'void Node::insert(int)':
doll.cpp:52:27: error: invalid conversion from 'int' to 'Node*' [-fpermissive]
52 | else ins->right = trig;
| ^~~~
| |
| int
doll.cpp: In member function 'int Node::prune()':
doll.cpp:59:43: error: invalid use of member function 'int Node::prune()' (did you forget the '()' ?)
59 | if (right != nullptr) s += right->prune;
| ~~~~~~~^~~~~
| ()
doll.cpp:60:41: error: invalid use of member function 'int Node::prune()' (did you forget the '()' ?)
60 | if (left != nullptr) s += left->prune;
| ~~~~~~^~~~~
| ()
doll.cpp: In member function 'int Node::identify(int, int**, int**)':
doll.cpp:93:33: error: 'j' was not declared in this scope
93 | if (left != nullptr) X[-j - 1] = left->id;
| ^
doll.cpp:94:17: error: 'j' was not declared in this scope
94 | else X[-j - 1] = ltrig;
| ^
doll.cpp:96:34: error: 'j' was not declared in this scope
96 | if (right != nullptr) Y[-j - 1] = right->id;
| ^
doll.cpp:97:17: error: 'j' was not declared in this scope
97 | else Y[-j - 1] = rtrig;
| ^
doll.cpp: In function 'void create_circuit(int, std::vector<int>)':
doll.cpp:111:28: error: 'log2' was not declared in this scope
111 | int height = (int)ceil(log2(N));
| ^~~~
doll.cpp:111:23: error: 'ceil' was not declared in this scope
111 | int height = (int)ceil(log2(N));
| ^~~~
doll.cpp:120:19: error: cannot convert 'Node::prune' from type 'int (Node::)()' to type 'int'
120 | int s = root->prune;
| ^~~~~
doll.cpp:128:24: error: cannot convert 'int (*)[s]' to 'int**'
128 | root->identify(-1, &X, &Y);
| ^~
| |
| int (*)[s]
doll.cpp:86:35: note: initializing argument 2 of 'int Node::identify(int, int**, int**)'
86 | int identify(int nextid, int* X[], int* Y[])
| ~~~~~^~~
doll.cpp:130:12: error: could not convert '(int*)(& C)' from 'int*' to 'std::vector<int>'
130 | answer(C, X, Y);
| ^
| |
| int*