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

📄 storedset.h

📁 本程序用VC++完成 定义类模板SortedSet (包括方法的实现)
💻 H
字号:
// StoredSet.h: interface for the StoredSet class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_STOREDSET_H__608D735D_6375_41D0_B714_EBB11564B836__INCLUDED_)
#define AFX_STOREDSET_H__608D735D_6375_41D0_B714_EBB11564B836__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
const int DefaultNum = 10;

template<class Type>
class StoredSet  
{
private:
	Type *mpElem;
	int mnSize;
	int mnCount;
	int (*mpComp)(const Type& t1,const Type& t2);
public:
	StoredSet();
	StoredSet(int(*pCompare)(const Type& t1,const Type& t2) , int nDefaultSize = DefaultNum);
	int Insert(const Type& t1);
	int Get(const Type& t1);
	int Del(const Type& t1);
	virtual ~StoredSet();
	int GetCount();
};

#endif // !defined(AFX_STOREDSET_H__608D735D_6375_41D0_B714_EBB11564B836__INCLUDED_)

⌨️ 快捷键说明

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