Link to home
Start Free TrialLog in
Avatar of shiffin
shiffin

asked on

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

What are the unacceptable characters in the key?
Thanks
Eugene
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

characters?
Word means a 16-bit integer, not a string at all
Maybe you need CMapStringToPtr, unique forbidden character is null (ascii 0)
Avatar of shiffin
shiffin

ASKER

I am sorry. It was CMapStringToPtr
Thanks
Eugene
Then you have the answer. Unique restricted character: ASCII 0
Avatar of jkr
The same restrictions as for CStrings apply. What chracter/string is giving you trouble?
Avatar of shiffin

ASKER

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

So far, that looks ok. What error are you getting and what is the original code?
ASKER CERTIFIED SOLUTION
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial