[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
CppMin

(C++) std::min

Function that returns the lower of the two arguments. The reverse is done by std::max. Can be found the STL header file algorithm.h.

  1. include <algorith>
  2. include <cassert>
int main() { const int small = 5; const int big = 10; assert(std::min(small,big)==small); assert(std::max(small,big)==big); }


Links

Code links



last edited (November 15, 2006) by bilderbikkel, Number of views: 2482, Current Rev: 4 (Diff)

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.