TIP: Click on subject to list as thread! ANSI
echo: nthelp
to: John Beckett
from: Geo
date: 2004-12-05 10:26:56
subject: Re: c++ help

From: "Geo" 

"John Beckett"  wrote
in message news:41b2a4bc.23977267{at}216.144.1.254...

> for (int i=1; i<=rand(); i++) { /* do something */ }
>
> I guess it doesn't matter, but this loop will call rand
> every time the loop is entered. This does nothing helpful.

It's a way of randomizing it because if you run the function twice quickly
the time function doesn't provide very good seed values. The idea was to
use the rand() function more to generate a better random value. IE, I want
rand() called multiple times.


The rest of your post is VERY helpful, thanks much.

Geo.

--- BBBS/NT v4.01 Flag-5
* Origin: Barktopia BBS Site http://HarborWebs.com:8081 (1:379/45)
SEEN-BY: 633/267 270 5030/786
@PATH: 379/45 1 396/45 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.