HI.

I have written the following code..in VC++(win32 console with MFC
support)


CMapStringToPtr chat;
vector v;
/*
UserMessage is a class..
*/
UserMessage *obj_msg=new
UserMessage(fromUser,fromUserName,'n',msg);
void * rValue;
CString toUser="abcd";
v.push_back(obj_msg); // Insering an object into vector v
chat.SetAt(toUser,&v); // Putting the vector 's reference
into map
"chat"
chat.Lookup(toUser,rValue);// Getting the vector 's reference
from
map "chat"


vector * vec=((vector *)rValue);
if(!vec->empty())
{
/* do some thing */
}
else
{
printf("Vector is empty");
}


///
It's not giving any compile errors...But..eventhough I put UserMessage



object into vector,
"Vector is empty " is being displayed on console..
(
I think the problem is with map Lookup function and typecasting
statement
vector * vec=((vector *)rValue);
)


I am just guessing it..
Why is this problem coming ?
plz help me out giving the solution to this problem


Thanx in advance,


Prasad