error come in insert function of map
Sort Game Sec. sorting and serrching challenges
@khemchandrs
your compare class function need pair<string,int> as argument so your map’s key must be pair<string,int> and there must be a value. change line 22 to map<pair<string,int>,int,compare> mp; and line 29 to mp[make_pair(name,sal)]=sal;
why are you stored sal twice map<pair<string,int>,int,compare> mp ? but there is not need of this
@khemchandrs
I was just trying to modify your code according to your compare class. You can create map<string,int,compare> but know you’ve to modify your compare class operation.