ID:18143
 
Basically, I'm creating this program in C++. But unfortunantly, C++'s random number generator is crap. If anyone knows of a random number generator code that:

a) Can produce a random number from a range of numbers.

b) Does not rely on time() or any other function as it needs to be run many times every second.

If anyone could find any random number generator code it would be greatly appriciated.

ADT_CLONE
Google "Mersenne-Twister"
Thanks a lot. It has helped me so far. Though are you sure that generator does a range of numbers? Because I can't seem to get it to work. I've managed to get around their high values of random generated numbers by dividing them by 100000000.
That's expected, ADT. The idea is that it generates numbers from 0 to the maximum value available in an unsigned integer. Divide by that value (65535, I believe?) to get something between 0 and 1. From there, you can do whatever.
Oh, thanks for that. I will have to do that then.
I believe you can just use the INT_MAX constant to divide by.