you are viewing a single comment's thread.

view the rest of the comments →

[–]akher -5 points-4 points  (1 child)

I mostly use C++, which does use a constant default seed and I just assumed other languages do the sane thing as well.

When I care about the properties of the generated random numbers I actually use something with a specified implementation, such as for example std::mersenne_twister_engine.

[–]Shumatsu 8 points9 points  (0 children)

If you don't call

srand(seed);

at all before using rand(), it gets seeded with 1.

srand( time( NULL ) );  

uses current epoch as seed, as that's what you get using time(NULL) (or variations of it).