Code not working properly, inorder and postorder code's are not working! whats the prob?

#include
using namespace std;

class node{

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

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

};

node * build()
{
int d;
cin>>d;

if(d==-1)
{
    return NULL;
}

node *k=new node(d);
k->data=d;
k->left=build();
k->right=build();
return k;

}

void print(node *root)
{
if(root==NULL)
{
return;
}
cout<data<<" ";
print(root->left);
print(root->right);
return;

}
void printIn(node *root)
{
if(root=NULL)
{
return;
}

printIn(root->left);
cout<<root->data<<" ";
printIn(root->right);
return;

}

void printPost(node * root)
{
if(root=NULL)
{
return;
}

printPost(root->left);
printPost(root->right);
cout<<root->data<<" ";
return;

}
int main()
{
node *root=build();
cout<<"PreOrder: ";
print(root);
cout<<endl;

cout<<"InOrder: ";
printIn(root);
cout<<endl;

cout<<"PostOrder: ";
printPost(root);

}

Save your code on ide.codingblocks.com and then share its link.

@yogekgargdev There were some minor mistakes in your code.
Check now:

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.