Mail Archives: djgpp/1997/10/21/23:55:56
Date: | Tue, 21 Oct 1997 23:52:34 -0400 (EDT)
|
From: | "H. Anthony Hoyt" <hahoyt AT eng2 DOT uconn DOT edu>
|
To: | DJGPP Mailing List <djgpp AT delorie DOT com>
|
Subject: | Re: Trouble with bools
|
In-Reply-To: | <199710220149.SAA19086@adit.ap.net>
|
Message-Id: | <Pine.SUN.3.95.971021234833.12442A-100000@lurch-fddi>
|
Mime-Version: | 1.0
|
Does this work
for (auto int i = 0 ; i < 640 ; i++)
for (auto int j = 0 ; j < 480 ; j++)
scrn[i][j] = 0;
What I know about "auto" is that once you are out of scope (for every new
"i" value) "j" will be destroyed then recreated. But again, how efficent
this is, I have my doubts. But I'm sure it works. (Unless anyone can
prove me wrong because I'm to lazy to compile a test program for this
right now) :P
Tony
May you find strength in magic -- RavenHart @}->--'--,---
On Tue, 21 Oct 1997, Nate Eldredge wrote:
> At 06:36 10/21/1997 GMT, Mark Phillips wrote:
> >why won't this work?
> >
> >[code snipped]
> >
> >bool scrn[640][480];
> >
> >[more code snipped]
> >
> > // initialize scrn:
> > for (int i=0; i<640; i++)
> > for (int j=0; j<480; j++)
> > scrn[i][j]=0;
> >
> >it never seems to leave the loop, what did i do wrong?
> >
> >also, is this kind of question meant for a c++ group or is it ok to
> >post here?
> No, you should post it to comp.lang.c++. I think your problem is something
> related to declaring loop variables in the `for' statement, though.
>
> Nate Eldredge
> eldredge AT ap DOT net
>
>
>
>
- Raw text -