有关下面 C++ 代码的说法,错误的是( )。
struct BiNode {
char data;
BiNode* lchid,*rchid;
};
class BiTree {
private:
BiNode* Creat();
void Release(BiNode* bt);
BiNode* root;
public:
BiTree() {
root = Creat();
}
~BiTree() {
Release(root);
- A. 上列 C++ 代码适用于构造各种二叉树。
- B. 代码
struct BiNode用于构造二叉树的节点。 - C. 代码
BiTree(){root=Creat();}
用于构造二叉树。
- D. 析构函数不可以省略。