Re: 'CMap' of 'CString' to 'CString'
- From: "Martin" <martin-g@xxxxxxx>
- Date: 14 Apr 2007 10:49:40 -0700
On Apr 14, 10:37 pm, "David Ching" <d...@xxxxxxxxxxxxxxxxxxxxxx>
wrote:
"Martin" <marti...@xxxxxxx> wrote in message
news:1176570681.221570.268650@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello!
I'm trying to create a dictionary with both key and value of type
'CString'. I declare the object of 'CMap' so it is as closer to
std::map, as possible:
CMap<CString, const CString&, CString, const CString&> m_appLangs;
and semantically it's like this:
std::map<std::string, std::string> m_appLangs;
You can use the pre-made class CMapStringToString instead of creating your
own.
But it seems 'CMap' is not realized as an RB-tree, I guess it must be
realized through hash table. The problem is when I make the above
declaration, my source file refuse to compile. Here is the simplified
error message:
cannot convert from 'const CString' to 'DWORD_PTR'
see reference to function template instantiation 'UINT
HashKey<ARG_KEY>(ARG_KEY)' being compiled with
[ARG_KEY=const CString &]
Not sure why this is, maybe it doesn't like either the "const" or the '&'.
-- David
.
- References:
- 'CMap' of 'CString' to 'CString'
- From: Martin
- Re: 'CMap' of 'CString' to 'CString'
- From: David Ching
- 'CMap' of 'CString' to 'CString'
- Prev by Date: Re: Standardized spelling checker interface?
- Next by Date: Re: 'CMap' of 'CString' to 'CString'
- Previous by thread: Re: 'CMap' of 'CString' to 'CString'
- Next by thread: Re: 'CMap' of 'CString' to 'CString'
- Index(es):
Relevant Pages
|