R
Rui Maciel
Is there a pure STL way to get the <key, value> pair which has the minimum value of
the map? I've tried the following but it wasn't very successful.
<code>
std::map<size_t,float> distance;
// fill distance map
size_t minimum = min_element(distance.begin(), distance.end(),
distance.value_comp())->first;
</code>
Thanks in advance,
Rui Maciel
the map? I've tried the following but it wasn't very successful.
<code>
std::map<size_t,float> distance;
// fill distance map
size_t minimum = min_element(distance.begin(), distance.end(),
distance.value_comp())->first;
</code>
Thanks in advance,
Rui Maciel