www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/22/08:46:29

From: Alistair Phillips <p9205755 AT student DOT anu DOT edu DOT au>
Newsgroups: comp.os.msdos.djgpp
Subject: Help: Using the clock to seed srand()
Date: Tue, 22 Apr 1997 17:50:11 +1000
Organization: Australian National University
Message-ID: <335C6DB3.39D@student.anu.edu.au>
Reply-To: a DOT phillips AT student DOT anu DOT edu DOT au
NNTP-Posting-Host: 150.203.21.88
Mime-Version: 1.0
Lines: 17
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019