Getting compilation error

hello @G_rahil
image
root is of type node * .
and >> operator dont know how to read any data of type node * ( it can only read primitive data like int ,float ,string ,char etc).
and that is the reason for compilation error.

if u want to read using >> operator then u should take help of operator overloading (i.e teach this ( >> operator) how to read node * type data).

same story goes for cout

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.