Unable to take input


this is my code. and according to dry run, i m getting correct output but i am unable to find why it is wrong

you can refer this for the input
class node
{
public:
string data;
nodeleft;
node
right;
node(string d)
{
data=d;
left=NULL;
right=NULL;
}
};
nodebuildtree()
{
string str;
cin>>str;
if(str==“false”)
{
return NULL;
}
if(str==“true”)
{
string d;
cin>>d;
node
root=new node(d);
root->left=buildtree();
root->right=buildtree();
return root;
}
node*root=new node(str);
root->left=buildtree();
root->right=buildtree();
return root;
}

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.