Algo++ : structurally identical (binary tree)

I am not able to take input properly . i am not able to form trees using the given input. code link : https://ide.codingblocks.com/s/106025

hey @amandahiya.3572, here is the logic for building the tree in this input format.
node * buidtree(string s){
if(s== " true "){
int d;
cin>>d;
node*root=new node(d);
string l;
cin>>l;
if(l==“true”){
root->left=buildtree(l);
}
string r;
cin>>r;
if(r==“true”){
root->right=buildtree ( r );
}
return root;
}
return NULL;
}

initially pass true as an argument,when you call this function.