doll.cpp: In member function 'void Node::insert(int)':
doll.cpp:53:27: error: invalid conversion from 'int' to 'Node*' [-fpermissive]
53 | else ins->right = trig;
| ^~~~
| |
| int
doll.cpp: In member function 'int Node::prune()':
doll.cpp:60:43: error: invalid use of member function 'int Node::prune()' (did you forget the '()' ?)
60 | if (right != nullptr) s += right->prune;
| ~~~~~~~^~~~~
| ()
doll.cpp:61:41: error: invalid use of member function 'int Node::prune()' (did you forget the '()' ?)
61 | if (left != nullptr) s += left->prune;
| ~~~~~~^~~~~
| ()
doll.cpp: In member function 'int Node::identify(int, int**, int**)':
doll.cpp:94:49: error: invalid conversion from 'int' to 'int*' [-fpermissive]
94 | if (left != nullptr) X[-id - 1] = left->id;
| ~~~~~~^~
| |
| int
doll.cpp:95:27: error: invalid conversion from 'int' to 'int*' [-fpermissive]
95 | else X[-id - 1] = ltrig;
| ^~~~~
| |
| int
doll.cpp:97:51: error: invalid conversion from 'int' to 'int*' [-fpermissive]
97 | if (right != nullptr) Y[-id - 1] = right->id;
| ~~~~~~~^~
| |
| int
doll.cpp:98:27: error: invalid conversion from 'int' to 'int*' [-fpermissive]
98 | else Y[-id - 1] = rtrig;
| ^~~~~
| |
| int
doll.cpp: In function 'void create_circuit(int, std::vector<int>)':
doll.cpp:121:19: error: cannot convert 'Node::prune' from type 'int (Node::)()' to type 'int'
121 | int s = root->prune;
| ^~~~~
doll.cpp:129:24: error: cannot convert 'int (*)[s]' to 'int**'
129 | root->identify(-1, &X, &Y);
| ^~
| |
| int (*)[s]
doll.cpp:87:35: note: initializing argument 2 of 'int Node::identify(int, int**, int**)'
87 | int identify(int nextid, int* X[], int* Y[])
| ~~~~~^~~
doll.cpp:131:12: error: could not convert '(int*)(& C)' from 'int*' to 'std::vector<int>'
131 | answer(C, X, Y);
| ^
| |
| int*