jeudi 9 juillet 2015

Seeding a random generator with the random header

Is there a way to simply seed a random generator but by using the <random> header instead of rand() and srand()?

I found the documentation about it quite abstruse.

I did notice that there is a seed_sq entry but I fail to understand it and it lacks example.

Lastly, my search engine only yielded me results on SO about srand and rand.

Please bear in mind that I'm "new" with C++ and generating random numbers in this language seems more complicated than, let's say, in Python.




Aucun commentaire:

Enregistrer un commentaire