From: mert0407 AT sable DOT ox DOT ac DOT uk (George Foot) Newsgroups: comp.os.msdos.djgpp Subject: Re: why is this giveing me a parse error? Date: 8 Jul 1997 21:15:02 GMT Organization: Oxford University, England Lines: 18 Message-ID: <5puakm$34v@news.ox.ac.uk> References: NNTP-Posting-Host: sable.ox.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Art S. Kagel (kagel AT ns1 DOT bloomberg DOT com) wrote: : On 4 Jul 1997, George Foot wrote: : > In C you are not allowed to define variables within a block; your : > definition of `bmh' must come before any code in the block, i.e. before : > the fopen call. C++ does allow you to define variables almost anywhere : > though. : Wrong! ANSI C does indeed allow one to define variables at the beginning : of any block! C++ further adds the ability to define variables anywhere : within a block. Please do not post mis-information. Sorry, what I wrote was unclear; I meant of course that any definitions must come at the start of the block, before any code in that block. My use of `within' was erroneous. -- George Foot Merton College, Oxford