Mail Archives: djgpp/1997/03/14/01:43:32
Paul Peavyhouse wrote:
> char *str;
> if ( (str = getenv("DEM_PATH")) == NULL) {
> printf("'DEM_PATH' environment variable not set\n");
> exit(1);
> }
> BITMAP *buffer; <-- Parse error on THIS line
>
> If I move BITMAP *buffer before the "if" statement, the compiler
> is
> all happy...WHY? Thanks anyway for the reply.
Because it's illegal C. In C all declarations must occur _before_ any
statements.
--
Erik Max Francis, &tSftDotIotE / email: max AT alcyone DOT com
Alcyone Systems / web: http://www.alcyone.com/max/
San Jose, California, United States / icbm: 37 20 07 N 121 53 38 W
\
"I am become death, / destroyer of worlds."
/ J. Robert Oppenheimer (quoting legend)
- Raw text -