Welcome, Guest. Please
login
or
register
.
Forums
Forums
Board
Topic
Home
Today's Posts
Gallery
Login
Register
Amiga.org
»
Operating System Specific Discussions
»
Amiga OS
»
Amiga OS -- Development
»
lame question about rand() :)
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: lame question about rand() :) (Read 4328 times)
Description:
0 Members and 1 Guest are viewing this topic.
Thomas
Hero Member
Join Date: Jun 2002
Posts: 3399
Country:
Thanked: 23 times
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
Logged
Email:
thomas-rapp@web.de
Home:
thomas-rapp.hier-im-netz.de
Print
Pages: [
1
]
Go Up
« previous
next »
Amiga.org
»
Operating System Specific Discussions
»
Amiga OS
»
Amiga OS -- Development
»
lame question about rand() :)
There was an error while thanking
Thanking...