<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2995" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>do you have find your solution?</FONT></DIV>
<DIV><FONT size=2>I met the same question.but after i add my compare method, it
works fine.</FONT></DIV>
<DIV><FONT size=2>so i think you can try to implement your own compare
way.</FONT></DIV>
<DIV><FONT size=2>for examples:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV>struct ltstr<BR>{<BR> bool operator()(const char* s1, const char* s2)
const<BR> {<BR> return strcmp(s1, s2) < 0;<BR>
}<BR>};<BR><BR>int main()<BR>{<BR> map<const char*, int, ltstr>
months;<BR> <BR> months["january"] = 31;<BR>
months["february"] = 28;<BR> months["march"] = 31;<BR>
months["april"] = 30;<BR> months["may"] = 31;<BR> months["june"] =
30;<BR> months["july"] = 31;<BR> months["august"] = 31;<BR>
months["september"] = 30;<BR> months["october"] = 31;<BR>
months["november"] = 30;<BR> months["december"] = 31;<BR> <BR>
cout << "june -> " << months["june"] << endl;<BR>
map<const char*, int, ltstr>::iterator cur =
months.find("june");<BR> map<const char*, int, ltstr>::iterator prev
= cur;<BR> map<const char*, int, ltstr>::iterator next =
cur; <BR> ++next;<BR> --prev;<BR> cout
<< "Previous (in alphabetical order) is " << (*prev).first <<
endl;<BR> cout << "Next (in alphabetical order) is " <<
(*next).first << endl;<BR>}<BR></DIV></BODY></HTML>