+ 2

What is a seed value?

9th Mar 2017, 1:04 PM
Luisa
5 ответов
+ 5
So use <ctime> ! to set seed value~ by srand(time(0)) Cr.Sololearn n someone
9th Mar 2017, 1:13 PM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 2
A seed in programming is a reference of random, if you force your random to reuse the same seed value, you will get the same "random" result.
9th Mar 2017, 1:08 PM
Geoffrey L
Geoffrey L - avatar
+ 1
If you want a real random you should use #include <ctime> . . srand(time(0)) then your rand will be real rand.
9th Mar 2017, 1:38 PM
Reef Baltter
Reef Baltter - avatar
+ 1
Generally speaking, most programming language do not provide purely random numbers, but *pseudo*random instead. That means they have an internal algorithm to produce a value, based on the previous result. A seed is an initial value for the sequence of those pseudorandom numbers.
9th Mar 2017, 4:13 PM
Álvaro
0
Seed is an unsigned integer to pass as parameter in rand function to produce a different sequence of random numbers
9th Mar 2017, 1:13 PM
AtoMX
AtoMX - avatar