2 test cases showing wrong out of 4

#include
using namespace std;

class node
{
public:
int data;
node *left;
node *right;

node(int d)
{
    data=d;
    left=NULL;
    right=NULL;
}

};

bool identical(node *root1,node *root2)
{
if(root1==NULL && root2==NULL)
return 1;

if(root1!=NULL && root2!=NULL)
{
    return identical(root1->left,root2->left);
    return identical(root1->right,root2->right);
}
return 0;

}

node *build(string s)
{
if (s == “true”)
{
int d;
cin >> d;
node *root = new node(d);
string l;
cin >> l;
if (l == “true”)
{
root->left = build(l);
}
string r;
cin >> r;
if (r == “true”)
{
root->right = build®;
}
return root;
}
return NULL;
}

int main()
{
node *root1=build(“true”);
node *root2=build(“true”);
bool temp=identical(root1,root2);
if(temp)
cout<<“true”;

else
  cout<<"false";

}

hi @Mukul-Shane-1247687648773500,
change the if condition to this -->

if(root1!=NULL && root2!=NULL)
    {
        return identical(root1->left,root2->left) and identical(root1->right,root2->right);
    }

as u want both at the same time (left and right to be equal)