Program of binary tree, C/C++ Programming

Assignment Help:

Program of Binary tree:

Btree::Btree(int O) : itemsInContainer(0)

{

    finishInit(O);

}

 

Btree::~Btree(void)

{

    if( root != 0 )

        delete root;

}

 

void Btree::flush( DeleteType dt )

{

    int oldValue = ownsElements();

    ownsElements( delObj(dt) );

    if( root != 0 )

        delete root;

    itemsInContainer = 0;

    root = 0;

    ownsElements( oldValue );

}

 

int Btree::hasMember( Object& o ) const

{

    if( !o.isSortable() )

        ClassLib_error( __ENOTSORT );

    if( root == 0 )

        return 0;

    else

        {

        Node* loc;

        int idx;

        return root->found(&(Sortable&)o, &loc, &idx) != NOOBJECT;

        }

}


Related Discussions:- Program of binary tree

Equation, My project is compiling but the equation entered is not working

My project is compiling but the equation entered is not working

Described storage qualifiers in c++ ?, A: They are following: Const: poi...

A: They are following: Const: point out that memory once initialized, must not be modify through a program. Volatile: denote that value in the memory location can be modified

Define classes and objects, Classes and Objects A class is a vehicle to...

Classes and Objects A class is a vehicle to execute the OOP features in the C++ language. Once a class is declared, an object of that type can be explained. An object is said t

Write a c program to input three real numbers, Write a C program to input t...

Write a C program to input three real numbers and  print them out as follows : The first variable is ....... and the second one is ...... The last variable is .......... T

Pattern, enter height of the shape: 1 3 5 3 1 3 5 7 5 3 5 7 9 7 5 3 5 7...

enter height of the shape: 1 3 5 3 1 3 5 7 5 3 5 7 9 7 5 3 5 7 5 3 1 3 5 3 1

Networking program development, Networking program development. 1.ARP pr...

Networking program development. 1.ARP protocol. 2.Switching HUB. 3.wireshark. 4.winpcap library. 5.C++ & MFC. 6.LAN evironment through switch and HUB(static ARP t

Areaunder curve, Write a program to find the area under the curve y = f(x) ...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b

Implement a algorithm to verify if the link list , Implement a Algorithm to...

Implement a Algorithm to verify if the link list is in Ascending order? A: template bool linklist::isAscending() const{ nodeptr ptr = head; while (ptr->_next)

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd