CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2000
    Posts
    18

    Fail to SetAt for CMap, Clist class

    Dear all,
    I have used a Windows 2000 professional 2000 and Visual Studio 6.00 with SP6. When i define a CMap class with integer key and CString object and i try to use the function of "SetAt" but it fail with assertion in the MFCD42.dll. The code is shown as follows.

    defined in abc.h

    CMap<int,int,CString, CString> m_packetPool;

    defined in abc.cpp

    m_packetPool.SetAt(1,"hello");

    Then fail in the line of afxtempl.h
    m_pFreeList=m_pFreeList->Next;

    Could anybody help me? It is extremely urgent.

    Thank you very much.

    Best regards,
    Paul

  2. #2
    Join Date
    Mar 2005
    Location
    Romania,Cluj-Napoca
    Posts
    1,073

    Re: Fail to SetAt for CMap, Clist class

    Did you tried to create a new Temporary projects and put these lines what you showed us ?
    I tried at my place and works.... ( I'm using Vs 2005 ).
    It's looks fine..... The posted code looks fine ..... but maybe you made some other things...?

    Regards,
    gili
    Please use code tags [code] [/code]

    We would change the world, but God won't give us the sourcecode..
    Undocumented futures are fun and useful....
    ___
    ______
    Gili

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured