iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
> the generator should start with a different number every time,
And if the implementation of rand() just uses the most significant 16 bits of the 32 bit number, that as far as it is concerned, time() is a constant pretty much throughout the day.
So it can take a couple of iterations for all the rapidly changing least significant bits to have an impact on the pseudo random sequence.
If you really want to know, run the code in the debugger and then single step into the srand() and rand() calls in asm mode and figure out what it is doing.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953