Subj : Help! STL map has something wrong if key type is char*!! To : borland.public.cpp.borlandcpp From : "cylin" Date : Fri Nov 14 2003 02:27 pm Dear all, I got some problem in using stl map. If my key type is char*, the result is always not successful. for example: ---------------------------------------------------------------------------- ----------------- #include #include #include using namespace std; typedef map >::value_type MapValueType; int main() { map > mymap; cout << "map size " << mymap.size() << endl; mymap["aaa"]=10; cout << "map size " << mymap.size() << endl; mymap.insert(MapValueType("bbb",30)); cout << "map size " << mymap.size() << endl; cout << mymap["aaa"] << endl; cout << (*mymap.find("bbb")).second << endl; cin.get(); return 0; } ---------------------------------------------------------------------------- --------------- This code is successful using Microsoft VC++ 6.0. What's wrong with BCC? Thanks for your help. Regards, cylin. .