Welcome, Guest. Please login or register.

Author Topic: lame question about rand() :)  (Read 4328 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Thomas

Re: lame question about rand() :)
« on: March 31, 2006, 04:42:02 PM »

rand() always starts at the same number. You have to call srand() in order to initialize the random number generator. Usually you will use srand(time(NULL)) to start at a somewhat real random number.

Bye,
Thomas