[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CppRandMax
Taken from my header file from C++ Builder:
In this case, RAND_MAX is 32,768, which equals 15 bits.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CppRandMax
(C++) RAND_MAX
Standard macro [1]. It's a #defined constant in the header file cstdlib, which equals the limit returned by std::rand. In other words, std::rand returns RAND_MAX-1 at heighest.Taken from my header file from C++ Builder:
- define RAND_MAX 0x7FFFU
In this case, RAND_MAX is 32,768, which equals 15 bits.
Reference
- 1) The C++ International Standard. 2003 (2nd edition). ISO/IEC 14882.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
