Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

(C++) std::max

 

Standard algorithm to get the heighest of two values. To get the lowest of two values, use std::min.

 

 

 

#include <algorithm>

 

int main()

{

const int a = 5;

const int b = 7;

const int heighest = std::max(a,b);

}

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.