From: David Jenkins Newsgroups: comp.os.msdos.djgpp Subject: Re: Help: Using the clock to seed srand() Date: Tue, 22 Apr 1997 10:51:54 +0100 Organization: None Distribution: world Message-ID: References: <335C6DB3 DOT 39D AT student DOT anu DOT edu DOT au> NNTP-Posting-Host: jenkinsdavid.demon.co.uk MIME-Version: 1.0 Lines: 29 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article <335C6DB3 DOT 39D AT student DOT anu DOT edu DOT au>, Alistair Phillips writes >Hi there, > >I'm having some trouble using the PC clock to seed srand() > >I have declared clock as > >unsigned int clock = (unsigned int *)0x0000046CL; > >then I call it > >srand(*clock); > >it compiles and links OK but when I run it I get a huge error message > >Can anyone please help me >Alistair Phillips >a DOT phillips AT student DOT anu DOT edu DOT au I just use srand(time(0)); Is this wrong??? -- http://www.jenkinsdavid.demon.co.uk for Newbie C programmers and a larf. ;-) David Jenkins