/* Filename: heapsort.cpp Programmer: Br. David Carlson Date: October 4, 1997 Last Revised: December 10, 2001 This program creates an array of 20 random integers, prints them, sorts them using heapsort, then prints the sorted list of numbers. Tested with: Microsoft Visual C++ 6.0 Microsoft Visual C++ .NET g++ under Linux */ #include "arrayutl.h" int main(void) { IntArrayType IntArray; FillArray(IntArray); cout << "Original data" << endl; Print(IntArray, Max); HeapSort(IntArray, Max); cout << endl << "Sorted data" << endl; Print(IntArray, Max); return 0; }