delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/23/07:17:56

From: Rodeo Red <rodeored AT netstep DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: "for" messages
Date: Tue, 23 Nov 1999 05:57:28 -0500
Organization: Church of Evangelical Environmental Extremism
Lines: 21
Message-ID: <D3EB3356CEB0EB49.3D00F0DBC012F60E.D6846BBF4DCC8800@lp.airnews.net>
X-Orig-Message-ID: <383A7317 DOT 36D6F0C0 AT netstep DOT net>
References: <F0458523BAB82511 DOT F75DE6F80A0A31D6 DOT 8D4647641CEFD2ED AT lp DOT airnews DOT net> <3839D8B8 DOT F0E10FB AT efd DOT lth DOT se> <31D677D3D5976EA1 DOT 2282C56AE95402D6 DOT 16BA81A6C65620CB AT lp DOT airnews DOT net> <3839FE04 DOT 9F9FEDF8 AT a DOT crl DOT com> <055AF6C058B39CA5 DOT AE73F39F516148F5 DOT 649AD2B8ADF2213B AT lp DOT airnews DOT net> <383A2AE2 DOT 9F313FDA AT a DOT crl DOT com>
Abuse-Reports-To: support at netstep.net to report improper postings
NNTP-Proxy-Relay: library1.airnews.net
NNTP-Posting-Time: Tue Nov 23 04:55:51 1999
NNTP-Posting-Host: !_2/o-@[.SjsrF3 (Encoded at Airnews!)
Mime-Version: 1.0
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Weiqi Gao wrote:

> Here's the key to your troubles!  You did not declare the 'i' in your
> second for() loop:
>
>   for (i = 0; i < 5; i++) {
>     // stuff
>   }
>
> "i = 0" is an assignment.  For it to be legal, 'i' must have been
> declared earlier in the scope.
> You can make it a declaration by changing "i = 0" to "int i = 0".

Yep that works . Thanks alot.


Red

"Space travel is utter bilge!"  -Sir Richard Van Der Riet Wolley


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019