www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/03/09:34:37

Xref: news2.mv.net comp.os.msdos.djgpp:4509
Newsgroups: comp.os.msdos.djgpp
Subject: use of srand with djgpp?
Message-ID: <1996Jun3.061709.120699@kuhub.cc.ukans.edu>
From: halibut AT kuhub DOT cc DOT ukans DOT edu
Date: 3 Jun 96 06:17:09 CDT
Organization: University of Kansas Academic Computing Services
Lines: 18
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

You'll have to forgive me if this question is too easy I'm a C
beginner, but any it has to do with srand.

To seed the random number table I always used srand(time(NULL)).
I have both time.h and stdlib.h included. Djgpp refuses to accept
this line of code. Is there any other way to do this?

I download some programs hoping to find this answer but most
of them had a randomize() function which Djgpp doesnt seem to touch
and one of them even querried the user for the seed!

Maybe this could be put in the faq?


Thanks,

Bryan Willett

- Raw text -


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