//// ex13_28.cpp// Exercise 13.28//// Created by pezy on 1/20/15.//// Given the following classes, implement a default constructor and the necessary copy-control members.#include "ex13_28.h"TreeNode& TreeNode::operator=(const TreeNode &rhs){++*rhs.count;if (--*count == 0) {delete left;delete right;delete count;}value = rhs.value;left = rhs.left;right = rhs.right;count = rhs.count;return *this;}BinStrTree& BinStrTree::operator=(const BinStrTree &bst){TreeNode *new_root = new TreeNode(*bst.root);delete root;root = new_root;return *this;}int main(){return 0;}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。