jeudi 26 mars 2015

Having a time changing within a program

So I'm generating some random numbers. I'm using



srand(time(NULL));


to generate random numbers. However I have this within a for loop. Im generating 10 'sets' of random numbers, but they are all the same. I was wondering how I could change this line of code to ensure the random numbers each time the program goes round the loop.





Aucun commentaire:

Enregistrer un commentaire