lundi 26 octobre 2020

Replace srand and rand_r [duplicate]

I would kindly ask you to provide me the similiar code in which there is not used srand, instead it is used a functionality from random.

unsigned int seed = now.get();
srand(seed);
auto r = rand_r(&seed);

Aucun commentaire:

Enregistrer un commentaire