By using this site, you agree to our Privacy Policy and our Terms of Use. Close

srand() just seeds the random number generator.  You then need to use rand() to actually obtain random numbers.

Here's a reference: http://www.cplusplus.com/reference/clibrary/cstdlib/rand.html