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

📄 hashtable.h

📁 这些程序是本人学习数据结构时编的
💻 H
字号:
// HashTable.h: interface for the HashTable class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_HASHTABLE_H__3BB09271_0A89_49BE_854A_57157707F413__INCLUDED_)
#define AFX_HASHTABLE_H__3BB09271_0A89_49BE_854A_57157707F413__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <list>
#include <string>
#include <fstream>
#include <iostream>

using namespace std;

class Data{
friend class Hash;
public:
	string word;
	string means;
	int operator == (const Data& item){
		if (word == item.word ) return 1;
		return 0;
	};
};


class Hash{
public :
	Hash();
	~Hash(){};
	int Remove (const string & x);
	int Insert (const Data & x);
	int Find(const string & x,Data& result);
private:
	struct HashTable{
		char Key;
		list<Data> l;
	};
	HashTable ht[26];
	int HashFunc(const string& x);
	list<Data>::iterator lp;
	int insert (const Data & x);
	void initialization();
};






#endif // !defined(AFX_HASHTABLE_H__3BB09271_0A89_49BE_854A_57157707F413__INCLUDED_)

⌨️ 快捷键说明

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