
-----------------------------------
babyman
Tue Dec 09, 2008 12:55 pm

i need help in this code
-----------------------------------
Hi,
I have not used c++ for long time as i am just minoring in computer science.
I had an assignment in which i was required to do the following:
You are asked to provide a C++ class to implement a MAX heap of integers.
Your class should have the appropriate constructors (including a copy-constructor)
and destructor. In addition, your class should provide the following operators and
functions:
(a) operator+ to allow for adding of two heaps (e.g., heap3 = heap1 +
heap2 results in heap3 contacting the element of heap1 and heap2).
(b) operator+ to allow for adding a single integer to a heap (e.g., heap2 =
heap1 + 5 results in heap2 containing the elements of heap and the value
5)
(c) operator
#ifndef HEAP_H
#define HEAP_H

class heap
{
	friend ostream &operator