#include <stdio.h>
#include <string>
#include <map>
using namespace std;
typedef struct mystr
{
int t;
};
typedef struct _MAPKEY
{
int ikey;
string strkey;
mystr mt;
bool operator < (const _MAPKEY& mapkey)const
{
if (mt.t ==0)
{
return strkey < mapkey.strkey;
}
return strkey < mapkey.strkey;
}
}MAPKEY;
map<MAPKEY, int>mymap;
int main()
{
MAPKEY m1,m2;
m1.ikey = 2;
m1.strkey = "hello";
m2.ikey = 23;
m2.strkey = "main";
mymap.insert(make_pair(m1,20));
mymap.insert(make_pair(m2,1));
map<MAPKEY,int>::iterator itt = mymap.begin();
itt = mymap.find(m2);
MAPKEY TM = itt->first;
return 0;
}