‹ 上一题 下一题 ›

g6-04702. GESP-6级-2023-12-单选-第04题 未做

有关下面 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. 析构函数不可以省略。
未选择
输入
输出

            
答案