堆的输出
我想用二叉树中序遍历的方法输出堆 不知道那里的错误 请帮忙改正 谢谢
void PrintS(int count)//输出
{
if(2*count <= Heap[0])
PrintS(count = count*2);
cout << Heap[count] << endl;
if((2*count+1) <= Heap[0])
PrintS(count = count*2 +1);
}//PrintS
heap[0]是堆中数据的个数
heap[1....heap[0]]为数据
