Re: CMap and struct
- From: David Wilkinson <no-reply@xxxxxxxxxxxx>
- Date: Thu, 03 May 2007 09:02:03 -0500
Arman Sahakyan wrote:
As others have noted you have some problems with the signatures of operator =() and operator ==().
As to HashKey(), you probably don't really need a hashed map, in which case you could use std::map from the standard library (std::map is a tree-based map, not a hash map).
In addition:
In this case he needs to overload operator < because std::map uses < to sort (insert into its search tree) elements of the container.
Ah, yes. I forgot about that. But no big deal. Easier than writing a hash function.
--
David Wilkinson
Visual C++ MVP
.
- Follow-Ups:
- Re: CMap and struct
- From: Vahid
- Re: CMap and struct
- References:
- CMap and struct
- From: Vahid
- Re: CMap and struct
- From: David Wilkinson
- Re: CMap and struct
- From: Arman Sahakyan
- CMap and struct
- Prev by Date: Re: CMap and struct
- Next by Date: Re: Accessing tables in MFC application
- Previous by thread: Re: CMap and struct
- Next by thread: Re: CMap and struct
- Index(es):
Relevant Pages
|