Пример #1
0
int main()
{
    Heap h;
    h.Create();
    cout << "Writing out the heap: ";
    h.write_out();
    cout << "\nDeleting the max value. Here's what's left: ";
    h.DeleteMaxVal();
    cout << endl;
    h.write_out();
    cout << "\nDeleting the max value. Here's what's left: ";
    h.DeleteMaxVal();
    cout << endl;
    h.write_out();
    cout << endl;
    cout << "Final heap: ";
    h.write_out();
    return 0;
}