代码如下:
#include "stdafx.h"
#include "afxtempl.h"UINT AFXAPI HashKey(CString cstr)
{
LPCTSTR key=(LPCTSTR) cstr;
UINT nHash = 0;
while (*key)
nHash = (nHash<<5) + nHash + *key++;
return nHash;
}
void main()
{
CMap <CString ,CString&,CPoint,CPoint&> map;
map[CString("aaaaaaa")]=CPoint(0,0);
map[CString("bbbb")]=CPoint(10,23); CPoint point;
if(map.Lookup(CString("bbbb"),point))
{};
}k:\vs98\vc98\mfc\include\afxtempl.h(129) : error C2440: 'type cast' : cannot convert from 'class CString' to 'unsigned long'
        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
        k:\vs98\vc98\mfc\include\afxtempl.h(1324) : see reference to function template instantiation 'unsigned int __stdcall HashKey(class CString &)' being compiled
Error executing cl.exe.
k:\vs98\vc98\mfc\include\afxtempl.h(129) 是:
template<class ARG_KEY>
AFX_INLINE UINT AFXAPI HashKey(ARG_KEY key)
{
// default identity hash - works for most primitive values
return ((UINT)(void*)(DWORD)key) >> 4;
}这该怎么办呀