Debug heapsort.cpp and modify main.cpp