Hi, here is how I used std::mapmapVar; void Myfun1() { ... CString strTemp = "str1"; mapVar[strTemp] = myStructObj1; } void MyFun2() { map<CString, CMyStruct>::const_iterator itr; Cstring strTemp = "str1"; itr = mapVar.find(strTemp); .... } Sometimes it is working fine but sometimes it is not working.