How would you make a function that generates a random number from 1 to 25 million?
I've thought about using rand()
but am I right in thinking that the maximum number, RAND_MAX
is = 32000 (there about)?
Is there a way around this, a way that doesn't reduce the probability of picking very low numbers and doesn't increase the probability of picking high / medium numbers?
Edit: @Jamey D 's method worked perfectly independent of Qt.