Solved

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

Posted on 2007-11-21
7
242 Views
Last Modified: 2013-11-20
What are the unacceptable characters in the key?
Thanks
Eugene
0
Comment
Question by:shiffin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20330218
characters?
Word means a 16-bit integer, not a string at all
Maybe you need CMapStringToPtr, unique forbidden character is null (ascii 0)
0
 

Author Comment

by:shiffin
ID: 20330250
I am sorry. It was CMapStringToPtr
Thanks
Eugene
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20330275
Then you have the answer. Unique restricted character: ASCII 0
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 86

Expert Comment

by:jkr
ID: 20330420
The same restrictions as for CStrings apply. What chracter/string is giving you trouble?
0
 

Author Comment

by:shiffin
ID: 20332427
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
 
LVL 86

Expert Comment

by:jkr
ID: 20332452
So far, that looks ok. What error are you getting and what is the original code?
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 250 total points
ID: 20332462
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

Featured Post

Database Solutions Engineer FAQs

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller single-server environments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question