定义类型的困惑
我要定义一个结构体,他的数据域要放(,) ,a,S,T,T2,^这个数据域要定义成什么
类型(我现在定义的是char )
typedef struct node
{ char data;
struct node * left;
struct node * middle;
struct node * right;
}TreeNode;
void makeTree(TreeNode * root,TreeNode * child)
{
if(child->data='('||child->data=',')
root->left=child;
else if(child->data='T'||child->data='a'||child->data='S')
root->middle=child;
else if(child->data='T2'||child->data=')')
root->right=child;
}
这是我定义的,maketree是一个函数,定义之后child->data='('or child->data=(