On Mon, 10 May 1999, Chris Antos wrote:
> >popularity. Second, Microsoft's C++ compiler is a disaster. It doesn't even
> >know how to handle simple things like:
> >
> >for (int i=1; i<10; i++) { // do some stuff... }
> >for (int i=1; i<10; i++) { // do some other stuff... }
hint of warning..
standard C will not allow you to declare variables unless you
are at a start of a block statement.
i dont think standard C allows for (int i=0...) - Java does!
why not do this:
{
int i;
for (i=1; i<10; i++) {
// do some stuff
}
}
{
int i;
for (i=1; i<10; i++) {
// do some other stuff
}
}
your declaration of 'i' is out of scope from each other.
and it is more like "standard" C.
putting extra { and } dont hurt your program !:)
cheers.
az
--
Aaron Ardiri
Lecturer http://www.hig.se/~ardiri/
University-College i G�vle mailto:[EMAIL PROTECTED]
SE 801 76 G�vle SWEDEN
Tel: +46 26 64 87 38 Fax: +46 26 64 87 88
Mob: +46 70 352 8192 A/H: +46 26 10 16 11
- Re: Visual C++ 6.0 and CDK 3.0 Bryon Lape
- Re: Visual C++ 6.0 and CDK 3.0 Jean Cyr
- Re: Visual C++ 6.0 and CDK 3.0 Jason Dawes
- Re: Visual C++ 6.0 and CDK 3.0 Dave Lippincott
- Re: Visual C++ 6.0 and CDK 3.0 Jean Cyr
- Re: Visual C++ 6.0 and CDK 3.0 Ade Barkah
- Re: Visual C++ 6.0 and CDK 3.0 Bryon Lape
- Re: Visual C++ 6.0 and CDK 3.0 Florent Pillet
- Re: Visual C++ 6.0 and CDK 3.0 Christian Vandendorpe
- Re: Visual C++ 6.0 and CDK 3.0 Chris Antos
- Re: Visual C++ 6.0 and CDK 3.0 Aaron Ardiri
- Re: Visual C++ 6.0 and CDK 3.0 Ade Barkah
- Re: Visual C++ 6.0 and CDK 3.0 Michael Yam
- Re: Visual C++ 6.0 and CDK 3.0 Chris Antos
- Re: Visual C++ 6.0 and CDK 3.0 Alan Kennington
- Re: Visual C++ 6.0 and CDK 3.0 Jean Cyr
- Re: Visual C++ 6.0 and CDK 3.0 Bryon Lape
- Re: Visual C++ 6.0 and CDK 3.0 Jean Cyr
- Re: Visual C++ 6.0 and CDK 3.0 Florent Pillet
