If you want to compare pair of map you can use this method:
typedef map<double, double> TestMap;TestMap testMap;pair<map<double,double>::iterator,bool> controlMapValues;controlMapValues= testMap.insert(std::pair<double,double>(x,y));if (controlMapValues.second == false ){ TestMap::iterator it; it = testMap.find(x); if (it->second == y) { cout<<"Given value is already exist in Map"<<endl; }}
This is a useful technique.