> rand() Itself has only 32767 possible values
For MingW maybe (due to MSVCRT). I think most libraries such as glibc have RAND_MAX at 2147483647.