⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test.cpp

📁 是编译器我花了好几个礼拜才编好的确实难的这是个不错的编译器
💻 CPP
字号:
#include "CMinHeap.h"


int minHeap[20] = {19,85,99,55,5,4,25,8,15,90,35,56};

class myComp{
public:
	static bool BiggerThan(const int & x, const int & y)  {
		return (x > y);
	}
};


void main(){
	CMinHeap<int,myComp> theHeap(minHeap,12,20);
	int nTem;
	/*
	theHeap.PrintArr();
	theHeap.Insert(1);
	theHeap.PrintArr();
	int nTem;
	theHeap.DelTop(nTem);
	cout<<nTem<<endl;
	theHeap.PrintArr();
	theHeap.Insert(2);
	theHeap.PrintArr();
	theHeap.DelTop(nTem);
	theHeap.PrintArr();
	theHeap.Remove(3,nTem);
	cout<<nTem<<endl;

	cout<<"************************************************"<<endl;

	theHeap.Insert(4);
	theHeap.Remove(9,nTem);
	cout<<nTem<<endl;
	*/
	theHeap.Insert(32);
	theHeap.Insert(25);
	theHeap.Insert(27);


	for(int i = 0;i<14;i++)
	{
		theHeap.DelTop(nTem);
	}

	for(int j = 0;j<15;j++)
	{
		cout<<minHeap[j]<<"  ";
	}






}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -