Maybe something like this?
dptr = iter->second;
if(dptr != NULL)
{
delete dptr;
iter->second = NULL;
}
Dave Sinkula
long time no c
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
I tried this also, but still i am facing the same problem.
MyMap[1] = p;
MyMap[2] = p;
MyMap[3] = p;
Why start at 1 when element 0 is the first element?
Dave Sinkula
long time no c
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
>could you help me in some questions
If you bother to ask them, and in a separate thread unless they are directly related to the original question asked in this thread or one of the replies.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401