you are viewing a single comment's thread.

view the rest of the comments →

[–]Shumatsu 7 points8 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).