www.delorie.com/archives/browse.cgi | search |
Xref: | news2.mv.net comp.os.msdos.djgpp:4550 |
From: | 95rgm AT eng DOT cam DOT ac DOT uk (R. Morgan) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Beginners srand error |
Date: | 3 Jun 1996 21:24:10 GMT |
Organization: | CUED |
Lines: | 31 |
Sender: | 95rgm AT eng DOT cam DOT ac DOT uk (R.G. Morgan) |
Message-ID: | <4ovl5q$f9p@lyra.csx.cam.ac.uk> |
References: | <1996Jun3 DOT 144827 DOT 120718 AT kuhub DOT cc DOT ukans DOT edu> |
NNTP-Posting-Host: | club.eng.cam.ac.uk |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
In article <1996Jun3 DOT 144827 DOT 120718 AT kuhub DOT cc DOT ukans DOT edu>, halibut AT kuhub DOT cc DOT ukans DOT edu writes: > > This gives me a parse error before int: > > #include <dos.h> > #include <stdio.h> > #include <stdlib.h> > #include <time.h> > #include <go32.h> > #include <sys/nearptr.h> > > void main() > { > srand(time(NULL)); > int num; > } > > Anyone know why? > Yes, the declaration statement needs to go at the beginning of main. Unless you're using C++. void main, anyone? -- hmmmm
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |