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?

Improve company productivity with a Business Account.Sign Up

x
 
Jaime OlivaresConnect With a Mentor Software 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
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
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.