template <class X> const X& min( const X& kxrItem1, const X& kxrItem2 );
#include <algorithm>
template <class X, class BinaryPred> const X& min( const X& kxrItem1, const X& kxrItem2, BinaryPred xComp );
#include <iostream>
#include <algorithm>
int main()
{
using namespace std;
const double kdPi = 3.141259;
const double kdE = 2.71828;
// Find the smaller of two values
cout << "The smaller of " << kdPi << " and " << kdE << " is ";
cout << min(kdPi, kdE);
// Keep the window open
cin.get();
return 0;
}
© 20072025 XoaX.net LLC. All rights reserved.