非成员函数不能使用cv限定符
cv限定符:cv是const和volatile的首字母缩写
node *find(const int &x,node *t)const {
if(t->value==x) return t;
else if(t->value>x) return find(x,t->left);
else return find(x,t->right);
}
出现|error: non-member function ‘node* find(const int&, node*)’ cannot have cv-qualifier|
将const删除,只能在类里面使用
node *find(const int &x,node *t){
if(t->value==x) return t;
else if(t->value>x) return find(x,t->left);
else return find(x,t->right);
}