From: "Sly" Newsgroups: comp.os.msdos.djgpp Subject: Re: DJGPP inconsistencies? Date: 17 Mar 1997 02:55:59 GMT Organization: Sly Lines: 32 Message-ID: <01bc327f$4b0b5300$89081ecb@sly> References: <33280F93 DOT B9B AT uxa DOT ecn DOT bgu DOT edu> <5g9pat$fac AT netra DOT montana DOT edu> Reply-To: "Sly" NNTP-Posting-Host: max0ppp07.bne.aussie.net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Paul Peavyhouse wrote in article <5g9pat$fac AT netra DOT montana DOT edu>... [SNIP] > NONONONONO, there is nothing wrong with the printf line. All it does > is output a litteral '"' (double-quote) character. The problem actually > occured in the line AFTER the snipped I posted where I said: > > 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. Again, same problem you had earlier. Declaring a variable inside code is a C++ thing, and illegal in standard C. In C, ALWAYS declare ALL variables BEFORE any code in the function. P.S. I realise my mistake concerning the printf line now, and it is correct. Just hadn't seen that escaped quote for a long time, and had forgotten it. I did prompt some replies though. 8^) -- TTFN Sly (Steve) sly AT aussie DOT net