#40765 - slum - Fri Apr 22, 2005 8:49 am
Hi everyone.
I need to generate a random integer using rand() function.
I wrote this :
but it doesn't work, generating the same number (~1400).
I think I need te get the ds timestamp, but I don't know how...
Thank you.
P.S. : Sorry, it's not in DS dev forum :/ please moive it :)
I need to generate a random integer using rand() function.
I wrote this :
Code: |
int gen=(int)(rand() & 0xFFFF); |
but it doesn't work, generating the same number (~1400).
I think I need te get the ds timestamp, but I don't know how...
Thank you.
P.S. : Sorry, it's not in DS dev forum :/ please moive it :)