Subj : null pointer becomes 1 To : borland.public.cpp.borlandcpp From : "heon" Date : Fri Oct 17 2003 07:27 am I have a strang problem. I sets a pointer with 0, but it bocomes 1 when I get and check it. In my program it doesn't set the pointer to 1. This thing doesn't happen all the time. It happens sometime but often. I have a structure as following: stypedef struct my_process { my_process_class* mpProcess; my_process_flag* mpFlag; long mCount; } MY_PROCESS; typedef map > MyProcMap; MyProcMap myPMap; I creates my_process structure with new and initialize members and put it in the myPMap long proc_id = 1; MY_PROCESS *pProc = new MY_PROCESS; pProc->mpProcess = new my_process_class; pProc->mpFlag = 0; pProc->mCount = 0; myPMap.insert( MyProcMap::value_type( proc_id, pProc ) ); I execute pProc in different thread. After a while, I get pProc from myPMap with proc_id=1 and check pProc->mpFlag. I expect the pointer value should be 0, but it is 1. Does any one know what's going on? the program is running under windows nt server and it is compiled with bcc32.exe. thank you in advance. heon .