Mail Archives: djgpp/1997/01/28/08:58:12
From: | Nils-Erik Svang=?iso-8859-1?Q?=E5?=rd <"nisse"@[194.22.170.29]>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Random numbers
|
Date: | Tue, 28 Jan 1997 08:16:26 -0800
|
Organization: | Solace Computer Society
|
Lines: | 29
|
Message-ID: | <5ck9gf$ft7$1@fizban.solace.mh.se>
|
NNTP-Posting-Host: | recluse.palmcrantz.se
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
I resently downloaded DJGPP and was thrilled.
But I have some questions.
*How do I get the random numbers within my own limit?
I currently use this code:
while(1)
{
tt=random();
tt=tt/10000000;
if(tt<320)break;
}
List[loop]=tt;
Nice? no I dont think so, there must several other ways to get by
this, or some command that I've missed. (random produces a random
number between 0....MAXINT, I hope that the answer wont be to go
change in the *.h file.
*Why are my compiled files so large?
I've compiled a nice "little" starfield I've been working on.
To my suprise the *.exe file was over 1.8Mb, bad news if you have
a small hardrive. Can you decrease that value?
*When I use delay(10); a warning message appears, it says error in
declaration int delay(...); but it's void delay(); in the help files.
It would be nice if someone could help me.
/nisse
- Raw text -