Go back to Richel Bilderbeek's homepage.

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

 

 

 

(C++) std::min

 

Standard algorithm to get the lowest of two values. To get the highest of two values, use std::max.

 

 

 

#include <algorithm>

 

int main()

{

const int a = 7;

const int b = 5;

const int lowest = std::min(a,b);

}

 

 

 

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

Go back to Richel Bilderbeek's homepage.