From 6044890817467507815
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,de99e5c46dfe5a28
X-Google-Attributes: gidf78e5,public
From: "Liam Fitzpatrick" <liam@iname.com>
Subject: Re: Multiple declarations in for loop?
Date: 1998/05/19
Message-ID: <6jroqf$kgh$1@news.indigo.ie>#1/1
X-Deja-AN: 354624064
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
References: <35608CBB.2571@lehman.com>
X-Original-Date: Tue, 19 May 1998 12:01:00 +0100
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Organization: Indigo
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUANWGTh+EDnX0m9pzZAQGbZAF/aIb2Q1uM2RKNV/++baFG1lEaXgYUD7fB ltKnsWW8uTIU00VPjdDQpsshDTBxIle4 =TLnP
Newsgroups: comp.std.c++


>F.I.: the compiler I am using (VC5.3) is accepting the following:
>
>int j=0;
>for (int i=0; i<10,j<10; i++, j++)
>{
> //...
>}
>
>but does not accept the following:
>
>for (int i=0, int j=0; i<10,j<10; i++, j++)
>{
> //...
>}
Only one simple-declaration is allowed. The following declares i and j as
you wish
for (int i=0, j=0; i<10,j<10; i++, j++)
{
 //...
}
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]



