srand

srand(time(null));
error cannot convert time to int
srand((unsigned int)time(0));
Same error
time_t works with no cast will this have any effect on the seed
Let us know your time() function syntax.

Edit : thanks pogady, the standard random engine you mentioned is great!
Last edited on
time_t works with no cast will this have any effect on the seed


No it won't.

consider using std::default_random_engine which is in <random>.

http://www.cplusplus.com/reference/random/

it works much better.
Topic archived. No new replies allowed.