Another way of writting

Apr 28, 2017 at 2:32am
What would be another way of writing this?

 
  max(max(population1, population2), max(population3, population4))
Apr 28, 2017 at 2:41am
it's clear and succinct enough as it is, why do you need another way? send some more context
Apr 28, 2017 at 3:15am
> max(max(population1, population2), max(population3, population4))
> What would be another way of writing this?

1
2
// overload (3) http://en.cppreference.com/w/cpp/algorithm/max
const auto max_pop = std::max( { population1, population2, population3, population4 } ) ;
Apr 28, 2017 at 8:07am
 
max (max (population1, max(population2, max (population3, population4))));

perhaps?
Topic archived. No new replies allowed.