What is a seed in terms of generating a random number?
I need to generate hundreds to thousands of random numbers, I have read a lot about using a "seed". What is a seed? Is a seed where the random numbers start from? For example if I set my seed to be 5 will it generate numbers from 5 to whatever my limit is? So it will never give me 3 for example.
I am using C++, so if you provide any examples it'd be nice if it was in C++.
Thanks!
srand
to seedrand()
. But the rich new random number generators in TR1 (okay, not so new) and in C++11 all have their own mechanics for seeding, andsrand
is not involved. – Drusilladrusus