lundi 27 juillet 2020

How to use std::uniform_int_distribution

I would like to be able to reset the lower and upper bounds of a std::uniform_int_distribution<T> object after it has been created, and it seems the param function in the class allows this functionality. See https://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution/param (2).

But it's not clear to me how to construct this param_type object that it takes in. Could someone provide an example?




Aucun commentaire:

Enregistrer un commentaire