delorie.com/archives/browse.cgi | search |
From: | "b279" <b279 AT inetone DOT net> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | while loops and for loops |
Date: | Mon, 1 Oct 2001 14:22:57 -0400 |
Organization: | Posted via Supernews, http://www.supernews.com |
Message-ID: | <trhd37bspfqaac@corp.supernews.com> |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.50.4133.2400 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4133.2400 |
X-Complaints-To: | newsabuse AT supernews DOT com |
Lines: | 28 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
I can't get them to work correctly. Problem 1: I have a for loop set up like this. for (int i=1, i<100, i++) my statements; But I get an error when I try to compile. Error: parse error before ')' - or something like that. What does it mean? I have my loop set up correctly. Problem2: I have a while loop set up like this. while(!kbhit()) my statements; I would assume it would loop until a key is pressed, but I can push all the on the keyboard, but the while loop continues on. Is the loop set up correctly, and is kbhit() use it the right way?
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |