Mail Archives: djgpp/1996/06/04/12:12:07
Thinking furiously, halibut AT kuhub DOT cc DOT ukans DOT edu wrote:
>
>
> This gives me a parse error before int:
>
> void main()
> {
> srand(time(NULL));
> int num;
> }
>
> Anyone know why?
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));
}
>
--
-------------------------------------------------------------------------------
.---- Fred Smith / Office: fred AT computrition DOT com
( /__ ,__. __ __ / __ : / 508-663-2524
/ / / /__) / / /__) .+' Home: fredex AT fcshome DOT stoneham DOT ma DOT us
/ / (__ (___ (__(_ (___ / :__ 617-438-5471
-------------------------------- Jude 1:24,25 ---------------------------------
- Raw text -