关于DeleteNode的一些疑问
void DeleteNode(){
if (this->pLChild != NULL){
this->pLChild->DeleteNode();
}
if (this->pRChild != NULL){
this->pRChild->DeleteNode();
}
if (this->pParent != NULL){
if (this->pParent->pLChild == this){
this==NULL;
}
if (this->pParent->pRChild == this){
this == NULL;
}
}
delete this;
}
//第三步的父节点判空 完全可以改成这样啊
if (this->pParent != NULL){
this == NULL;
}