How to take input

Can U pls explain me how to take the input in this case???

node *buildtree()
{
string d;
cin>>d;
if(d==“false”)
return NULL;
else if(d==“true”)
{
int a;
cin>>a;
node *root = new node(a);
root->left = buildtree();
root->right = buildtree();
return root;
}
else
{
stringstream geek(d);
int x = 0;
geek >> x;
node *root = new node(x);
root->left = buildtree();
root->right = buildtree();
return root;
}
}

Use this code for building the tree

Thnx…will rate u 5 star…

@soumakpoddar55 Please mark your doubt as resolved now.