www.delorie.com/archives/browse.cgi | search |
Xref: | news2.mv.net comp.os.msdos.djgpp:4625 |
From: | Tom Wheeley <tomw AT tsys DOT demon DOT co DOT uk> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Beginners srand error |
Date: | Tue, 04 Jun 96 23:08:32 GMT |
Organization: | City Zen FM |
Lines: | 30 |
Message-ID: | <833929712snz@tsys.demon.co.uk> |
References: | <199606041116 DOT HAA03721 AT fcshome DOT stoneham DOT ma DOT us> |
Reply-To: | tomw AT tsys DOT demon DOT co DOT uk |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
In article <199606041116 DOT HAA03721 AT fcshome DOT stoneham DOT ma DOT us> fredex AT fcshome DOT stoneham DOT ma DOT us writes: > Sure. Because this is C, not C++. In C declarations must be placed > at the top of a block, not just anywhere at random. Try changing it > to look like: > > void main() > { > int num; > srand(time(NULL)); > } Don't look like C to me. Try int main() or just main() You don't even have to return anything, but you should really. ..splitbung -- * TQ 1.0 * The 'Just So Quotes'. 'My Country right or wrong' is like saying 'My Mother drunk or sober.' " -- G. K. Chesterton
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |