Unrivaled1
IS-IT--Management
I've done my homework and found numerous references to the following code being as close to random as VC++ gets:
srand((unsigned)time(NULL));
d100 = 1 + rand()%100;
However, if you run this repeated with no pause you get a steadily increasing "random" value until it crests 100 and starts over again. This is hardly random and I have to believe there must be a more truly random method.
Anyone have any thoughts?
srand((unsigned)time(NULL));
d100 = 1 + rand()%100;
However, if you run this repeated with no pause you get a steadily increasing "random" value until it crests 100 and starts over again. This is hardly random and I have to believe there must be a more truly random method.
Anyone have any thoughts?