...
The C Standard rand()
function, exposed through the C++ standard library through <cstdlib>
as std::rand()
, makes no guarantees as to the quality of the random sequence produced. The numbers generated by some implementations of std::rand()
have a comparatively short cycle, and the numbers can be predictable. Applications that have strong pseudorandom number requirements must use a generator that is known to be sufficient for their needs.
...