[gameprogrammer] Making random numbers in C++
- From: Azeem Zaheer <azeem_841@xxxxxxxxxxx>
- To: <gameprogrammer@xxxxxxxxxxxxx>
- Date: Thu, 1 Jan 2009 00:53:12 +0500
hii know this question is not directly related to game programming, but I am
sure u guyz can help me out.I am making a program in which I need about 10,000
"random" numbers ranging from 1 to 10.I have to make it in C++.So, when I use
srand(time(NULL)); it works..but it is tooo slow.I takes 1 whole second to
process and generate 1 number.I will have to wait 1000 secs, which is hell of a
time.Please suggest me someway to make random numbersmore quicker.Just tell me
how to make 1 random number in 1 millisecond or even less.I am really waiting
for your reply.Thanks in advance.and HAPPY NEW YEAR.
_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces.
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
Other related posts: