如题所述
template
class TreeNode{
public:
T data;
int index;
int active;
TreeNode & operator=(TreeNode & treenode)
{
this->data=treenode.data;
this->index=treenode.index;
this->active=treenode.active;
return *this;
}
};
class TreeNode{
public:
T data;
int index;
int active;
TreeNode & operator=(TreeNode & treenode)
{
this->data=treenode.data;
this->index=treenode.index;
this->active=treenode.active;
return *this;
}
};
温馨提示:答案为网友推荐,仅供参考