that's what I have here too. The first numbers are ALWAYS the same.
But now, even more weird: I notice that instead of doing
Code:
srand (time (NULL)); // initialize random seed
if I do
Code:
srand (GetTickCount ()); // initialize random seed
instead, then it does work normally (i.e, the first numbers are different this time).
What the ... ???
@botman
I might be wrong, but I think doing
ends up with a not so random pseudo-random number generation. Doing a modulo unevens the distribution of the numbers in the suite along the {0, 100} axis. Any math brute (Hey Joe!) to confirm ?