+ 4

What is seed value

24th Dec 2017, 9:03 AM
Nashif Alam
Nashif Alam - avatar
2 Respostas
0
With a different seed you get different random numbers. So you want to give it a unique value. For small applications, you just make the seed time(0) from <ctime>. That is the current amount of seconds after 1970. Btw for random number generation, you should use the modern <random> header instead of the old rand().
24th Dec 2017, 10:57 AM
Timon Paßlick
+ 2
seed value used to initialize a pseudorandom number generator
24th Dec 2017, 9:06 AM
Sanvi Deep
Sanvi Deep - avatar