Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++ 2005
|
Visual C++ 2005 For discussion of Visual C++ 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 1st, 2009, 12:46 AM
Registered User
 
Join Date: Mar 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default use of CString as a key in a CMap

We are migrating from VC++ 6 to VS 2005.
I am getting the following errors which i could not resolve


HTML Code:
D:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\afxtempl.h(168) : error C2440: 'type cast' : cannot convert from 'CString' to 'DWORD_PTR'
        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
        D:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\afxtempl.h(1547) : see reference to function template instantiation 'UINT HashKey<ARG_KEY>(ARG_KEY)' being compiled
        with
        [
            ARG_KEY=CString
        ]
        D:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\afxtempl.h(1546) : while compiling class template member function 'CMap<KEY,ARG_KEY,VALUE,ARG_VALUE>::CAssoc *CMap<KEY,ARG_KEY,VALUE,ARG_VALUE>::GetAssocAt(ARG_KEY,UINT &,UINT &) const'
        with
        [
            KEY=CString,
            ARG_KEY=CString,
            VALUE=int,
            ARG_VALUE=int &
        ]
        D:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\afxtempl.h(1599) : while compiling class template member function 'int &CMap<KEY,ARG_KEY,VALUE,ARG_VALUE>::operator [](ARG_KEY)'
        with
        [
            KEY=CString,
            ARG_KEY=CString,
            VALUE=int,
            ARG_VALUE=int &
        ]
        D:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\afxtempl.h(1358) : while compiling class template member function 'void CMap<KEY,ARG_KEY,VALUE,ARG_VALUE>::SetAt(ARG_KEY,ARG_VALUE)'
        with
        [
            KEY=CString,
            ARG_KEY=CString,
            VALUE=int,
            ARG_VALUE=int &
        ]
        D:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\afxtempl.h(1482) : while compiling class template member function 'CMap<KEY,ARG_KEY,VALUE,ARG_VALUE>::~CMap(void)'
        with
        [
            KEY=CString,
            ARG_KEY=CString,
            VALUE=int,
            ARG_VALUE=int &
        ]
        d:\codestore\raghud_view_ma2\material_allocator\src\se_source\macro\MacroAction.h(14) : see reference to class template instantiation 'CMap<KEY,ARG_KEY,VALUE,ARG_VALUE>' being compiled
        with
        [
            KEY=CString,
            ARG_KEY=CString,
            VALUE=int,
            ARG_VALUE=int &
        ]





Similar Threads
Thread Thread Starter Forum Replies Last Post
convert wchar* to cstring arun.sharma.kumar Visual C++ 8 February 20th, 2007 01:52 AM
<bean:message key="PNR.INPUT"/> key has null value warsha_14 Struts 1 November 13th, 2006 07:26 AM
TAB KEY working together KEY PRESS event thomaz C# 4 August 20th, 2006 02:47 PM
Where is CString?? samehkh Visual C++ 1 April 11th, 2006 10:19 PM
Converting from managed String to MFC CString neethling Visual C++ 0 October 28th, 2004 10:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.