Map Question C++

Hello All,

I am having an issue of putting a Boolean value in the maps as the 3rd parameter. Something like the following :

int value;
std::map<String str, int x, bool bl>

where bool returns false if x>value else true.

All I see in the map examples is that I can add the compare object parameters which compares the key value of the map and returns the result accordingly.

Any suggestion would be greatly appreciated!

Thanks,

You may use a struct, for grouping the bolean variable and integer varaible.
Suppose,

struct strct_value_bool{
 int x;
 bool bl;
};
std::map<String str, strct_value_bool> myMap;

That worked totally fine! :b:

Thank you!