Name
srand function — Sets seed for pseudo-random number generator
Synopsis
void srand(unsigned int seed)
The srand
function saves
seed
as the seed for a new
sequence of pseudo-random numbers to be returned by successive calls
to rand
. The default seed is
1
.
See Also
Get C++ In a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.