please send the corrected code link so that i can see what is the problem in code
My code is not compiling
Line 22: node* root = new node(root);
Here you are trying to make a copy of root node but the implicit copy constructor takes the node to be copied as a parameter, not its pointer. Try this
node* root = new node(*root);
One more thing:
Line 101: node* root = buildtree(true);
true is a boolean value, “true” is a string.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.