User-defined compare function on C++ Map STL

I try to write my compare function to use on map but it raised errors. Please help me, thanks a lot.
My code: https://ide.codingblocks.com/s/233622

@luchd,
C++ STL Map, only sorts on the basis of key value, not pair {key, value}, and thus expects a comparator of same type. Anyways, why are you using map, you can just use vector of pair and sorting.

@abhijeet.srivastava6499
So what is compare function going to be if I use C++ STL Map?

@luchd,
Don’t use Map here, this is not a functionality of Maps. You are just over complicating a simple task.

Thanks @abhijeet.srivastava6499, I got it