hash_multimap::hash_delegate (STL/CLR)
尋找符合指定之索引鍵的項目。
hasher^ hash_delegate();
備註
成員函式會傳回用來將機碼的值轉換成整數的委派。您可以用它來雜湊索引鍵。
範例
// cliext_hash_multimap_hash_delegate.cpp
// compile with: /clr
#include <cliext/hash_map>
typedef cliext::hash_multimap<wchar_t, int> Myhash_multimap;
int main()
{
Myhash_multimap c1;
Myhash_multimap::hasher^ myhash = c1.hash_delegate();
System::Console::WriteLine("hash(L'a') = {0}", myhash(L'a'));
System::Console::WriteLine("hash(L'b') = {0}", myhash(L'b'));
return (0);
}
需求
標頭: < cliext/hash_map >
Namespace: cliext