Поделиться через


CMap::InitHashTable

Initializes the hash table.

void InitHashTable(
   UINT hashSize,
      BOOL bAllocNow = TRUE 
);

Параметры

  • hashSize
    Number of entries in the hash table.

  • bAllocNow
    If TRUE, allocates the hash table upon initialization; otherwise the table is allocated when needed.

Заметки

For best performance, the hash table size should be a prime number. To minimize collisions, the size should be roughly 20 percent larger than the largest anticipated data set.

Пример

See the example for CMap::Lookup.

Требования

Header: afxtempl.h

См. также

Основные понятия

CMap Class

CMap Members

Hierarchy Chart

CMap::GetHashTableSize