Is there any restriction on characters used in CMapWordToPtr key value?

What are the unacceptable characters in the key?
Thanks
Eugene
shiffinAsked:
Who is Participating?
 
Jaime OlivaresSoftware ArchitectCommented:
You have not exposed your problem. Error message? Undesired result?
In you code I see something strange:

while (pCurVal != NULL)
    {
           if(OnSomeCondition){
            delete myMap.pointer
             myMap.RemoveKey("xxx")
           }
           pCurVal= myMap.PGetNextAssoc(pCurVal);  // notice the position of this line
    }
0
 
Jaime OlivaresSoftware ArchitectCommented:
characters?
Word means a 16-bit integer, not a string at all
Maybe you need CMapStringToPtr, unique forbidden character is null (ascii 0)
0
 
shiffinAuthor Commented:
I am sorry. It was CMapStringToPtr
Thanks
Eugene
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Jaime OlivaresSoftware ArchitectCommented:
Then you have the answer. Unique restricted character: ASCII 0
0
 
jkrCommented:
The same restrictions as for CStrings apply. What chracter/string is giving you trouble?
0
 
shiffinAuthor Commented:
I think I am doing a different mistake
Inside loop, I remove some keys. I think this is the problem. Is it?
Eugene
    pCurVal= myMap.PGetFirstAssoc( );
    while (pCurVal != NULL)
    {
           pCurVal= myMap.PGetNextAssoc(pCurVal);
           if(OnSomeCondition){
            delete myMap.pointer
             myMap.RemoveKey("xxx")
           }
    }
    if(myMap.IsEmpty())myMap.RemoveAll()

Open in new window

0
 
jkrCommented:
So far, that looks ok. What error are you getting and what is the original code?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.