?? bihashtable.h
字號:
#pragma once
#include <string>
#include <hash_map>
using std::string ;
using stdext::hash_map ;
//a bidirectional-hash-table which can get id by word as well as get word by id
class BiHashTable
{
public:
BiHashTable() ;
bool GetIDByWord(const string& strWord, int& nId) ;
bool GetWordByID(int nId, string& strWord) ;
bool GetIDAndInsertByWord(const string& strWord, int &nId) ;
int GetCount() ;
bool Save(const string& strFilename) ;
bool Load(const string& strFilename) ;
private:
hash_map<string, int> m_Word2IdMap ;
hash_map<int, string> m_Id2WordMap ;
int m_count ;
};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -