How to write input in this format

i did this
#include

class BinaryTreeNode
{
public:
T data;
BinaryTreeNode *left;
BinaryTreeNode *right;
BinaryTreeNode(T data)
{
this->data = data;
left =NULL;
right = NULL;
}
~BinaryTreeNode()
{
delete left;
delete right;
}
};

BinaryTreeNode *BuildTree()
{
int rootData;
cin>>rootData<<" "<<NoOdfChild<<endl;
if(rootData==-1)
{
return NULL;
}

}
int main() {
return 0;
}

how to write further

hello @mananrasool2 i would like to help you could you please elaborate your doubt so that i can help you in the better way .
do you have doubt in input or how to code for this ?
and i request you to share your code by saving it on ide.codingblocks.com

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.