From: wmcgugan AT netcomuk DOT co DOT uk (William McGugan) Newsgroups: comp.os.msdos.djgpp Subject: Re: yet another cry for help! - ants.zip [01/01] Date: Thu, 27 Mar 1997 18:25:36 GMT Organization: None. (via NETCOM Internet Ltd. USENET service). Lines: 13 Message-ID: <333aba53.15255089@nntp.netcomuk.co.uk> References: <5hdjl6$5da$1 AT news DOT wco DOT com> NNTP-Posting-Host: dialup-18-22.netcomuk.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp On Thu, 27 Mar 97 07:55:28 GMT, Paranoid AT oakweb DOT com (Mark) wrote: >can anyone tell me why this program always protection faults on me? I've >tried everything I know and it compiles like a dream but it still screws up on >me... btw the AI's not complete yet but it still should work... BTW incase >you haven't already figured it out this is supposed to be an antfarm... > I think it's your usage of the random function that is to blame. It returns a number between 0 and MAXINT, it doesn't take any parameters. William McGugan. http://www.netcomuk.co.uk/~wmcgugan