Solved

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

Posted on 2007-11-21
7
236 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Error on moodle after upgrade 3 155
string initialization in java 11 122
FizzBuzz challenge 9 87
canBalance challenge 34 113
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.

752 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