From: karpfenteich AT gmx DOT de (Peter Karp) Newsgroups: comp.os.msdos.djgpp Subject: Re: variable declaration in for-header fails?? Date: Thu, 13 Jan 2000 21:17:16 GMT Lines: 32 Distribution: world Message-ID: <387e3d0b.10484983@news.netcologne.de> References: <387d91d5 DOT 333064 AT news DOT netcologne DOT de> NNTP-Posting-Host: dial-rs2-205-71.netcologne.de X-Trace: news.netcologne.de 947798086 19477 194.8.205.71 (13 Jan 2000 21:14:46 GMT) X-Complaints-To: usenet AT news DOT netcologne DOT de NNTP-Posting-Date: 13 Jan 2000 21:14:46 GMT X-Newsreader: Forte Free Agent 1.11/32.235 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi again! oops, my question was off-topic (I thought it would be a compiler specific problem, sorry) thanks for your help, now I see that it's impossible to use, > for(int x=1, cout << x , x++ ;x<=100; x++) as it's not possible to define int cout << x int x++ which would happen here (which I had overlooked and wouldn't have found without your help :) The motivation for this "dumb" question was that I thought that the definition of x inside the for loop header would make the variable x a local variable of the loop, which isn't true! So it's of no benefit when I would define the variable inside the loop header (besides the syntax error I've made anyway!). I have a new lesson learned :-) Thanks. Oh, last not least. I didn't tried the function in Borland C++ 3.1. My brother did that for me and told me it would work. So it seems he hadn't really used the program, but a modified version. So I consider him liable to recourse ;-) Greetings from Cologne Peter