Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

CMapStringToOb::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.

The following table shows other member functions that are similar to CMapStringToOb::InitHashTable.

Class

Member Function

CMapPtrToPtr

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

CMapPtrToWord

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

CMapStringToString

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

CMapStringToPtr

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

CMapWordToOb

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

CMapWordToPtr

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

Header: afxcoll.h

Community Additions

ADD
Show:
© 2015 Microsoft