GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::experimental::reseed(3) C++ Standard Libary std::experimental::reseed(3)

std::experimental::reseed - std::experimental::reseed


Defined in header <experimental/random>
void reseed(); (1) (library
fundamentals TS v2)
void reseed(std::default_random_engine::result_type value); (2) (library
fundamentals TS v2)


Reseeds the per-thread random number engine and any std::uniform_int_distribution
instances used by randint.


1) Sets the per-thread engine to an unpredictable state.
2) Seeds the per-thread engine g as if by g.seed(value).


value - value of the new seed


Remarks


Subsequent calls to randint do not depend on values produced by the per-thread
engine prior to calling reseed.

// Run this code


#include <experimental/random>
#include <iostream>


int main()
{
std::experimental::reseed();


std::cout << "Random 2-digit decimal numbers: ";


for (auto i = 0; i != 3; ++i)
{
std::cout << std::experimental::randint(10, 99) << ' ';
}
}


Random 2-digit decimal numbers: 41 60 56


randint generates a random integer in the specified range
(function template)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.