C++ Implementation of Heap Data Structure