This question already has an answer here:
- How to generate a random int in C? 26 answers
I've got a c++ program which is executed multiple times in parallel in a python script. The c++ program generates data utilizing rand(). The multiple processes are all generating identical data, presumably because they are all opened at the same time (I use srand(time(NULL)) as the seed.) How do I force the sub processes to diverge?
Aucun commentaire:
Enregistrer un commentaire