Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++ 2005
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
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 &
        ]
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
convert wchar* to cstring arun.sharma.kumar Visual C++ 8 February 20th, 2007 12:52 AM
<bean:message key="PNR.INPUT"/> key has null value warsha_14 Struts 1 November 13th, 2006 06: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



All times are GMT -4. The time now is 10:12 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.