Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/numeric/random/srand"

From cppreference.com
< cpp‎ | numeric‎ | random
m (Text replace - "{{see also}}" to "===See also===")
m (Text replace - "<!-- ======== --> " to "")
Line 7: Line 7:
 
Initializes the built-in random number generator used to generate values for {{rlpf|rand}} with the seed value {{tt|seed}}.  
 
Initializes the built-in random number generator used to generate values for {{rlpf|rand}} with the seed value {{tt|seed}}.  
  
<!-- ======== -->
 
 
===Parameters===
 
===Parameters===
 
{{param list begin}}
 
{{param list begin}}
Line 13: Line 12:
 
{{param list end}}
 
{{param list end}}
  
<!-- ======== -->
 
 
===Return value===
 
===Return value===
 
{{return none}}
 
{{return none}}
  
<!-- ======== -->
 
 
===Example===
 
===Example===
 
{{example cpp
 
{{example cpp
Line 24: Line 21:
 
}}
 
}}
  
<!-- ======== -->
 
 
===See also===
 
===See also===
  

Revision as of 18:16, 2 August 2011

Template:cpp/numeric/random/sidebar

Defined in header <cstdlib>
void srand( unsigned seed );

Initializes the built-in random number generator used to generate values for rand() with the seed value seed.

Contents

Parameters

seed - the seed value

Return value

Template:return none

Example

Template:example cpp

See also

Template:cpp/numeric/random/dcl list rand