From: Rodeo Red Newsgroups: comp.os.msdos.djgpp Subject: "for" messages Date: Mon, 22 Nov 1999 18:45:32 -0500 Organization: Church of Evangelical Environmental Extremism Lines: 62 Message-ID: X-Orig-Message-ID: <3839D59A DOT 701A25F6 AT netstep DOT net> Abuse-Reports-To: support at netstep.net to report improper postings NNTP-Proxy-Relay: library2.airnews.net NNTP-Posting-Time: Mon Nov 22 17:44:12 1999 NNTP-Posting-Host: !\#`H-@[/2M void main() { // Create an array of five integers // float num[5]; // Iterate through the array elements, initializing // them with float values // for (int i = 0; i < 5; i++) num[i] = i * 2.25f; // Iterate through the array elements, // displaying their values... for (i = 0; i < 5; i++) cout << "num[" << i <<"] == " << num[i] << '\n'; } Produces these messages : testfile.cpp: In function `int main(...)': testfile.cpp:25: name lookup of `i' changed for new ANSI `for' scoping testfile.cpp:19: using obsolete binding at `i' Line 25 is: for (i = 0; i < 5; i++) Line 19 is: for (int i = 0; i < 5; i++) djgpp compiler does not seem to tell me if these are error messages or warnings. Is there any way to tell ? Also what are these messages trying to tell me ? I have no idea what they mean. How can I make this program work ? I searched for "binding" and "scope" in the faq but didn't find anything. Is there anywhere I can find a list of errors and warnings with explainations of what they mean ? Red --