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
Solved

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

Posted on 2007-11-21
7
232 Views
Last Modified: 2013-11-20
What are the unacceptable characters in the key?
Thanks
Eugene
0
Comment
Question by:shiffin
  • 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Installing Microsoft R server on REDHAT or SUSE Linux 4 147
substring method in java 1 129
twoTwo  challenge 35 107
NotAlone Challenge 20 84
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: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

839 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