Re: Random number
Re: Random number
- Subject: Re: Random number
- From: Marc Weil <email@hidden>
- Date: Fri, 11 Jul 2003 10:40:01 -0400
Use srand(time(NULL)) to seed the random number generator. Make sure that
you #include <time.h> and <math.h>.
- Marc Weil
On 7/11/03 10:30 AM, "Toon Van Acker" <email@hidden> wrote:
>
I can get a random number using random(), but it stays the same. What I
>
mean is: I'm creating objects which should have random coordinates, but
>
every one of them has the same coordinates.
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.