From: "Marp" Newsgroups: comp.os.msdos.djgpp Subject: Re: DJGPP and while loop. Date: Sat, 13 May 2000 22:46:30 -0400 Organization: MindSpring Enterprises Lines: 41 Message-ID: <8fl4cb$271$1@slb3.atl.mindspring.net> References: NNTP-Posting-Host: 04.30.99.9e X-Server-Date: 14 May 2000 02:51:55 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Aleks D." wrote in message news:fboT4.56105$r37 DOT 670154 AT news20 DOT bellglobal DOT com... > Hello, > > I am running Windows 98 and DJGPP. I am a beginner in C and am having > problems running compiled programs that include a while loop. I can > successfully compile the following code from RHIDE: > > > #include > > > int main() > { > int count; > > count = 0; > > while(count < 6); This line should not have a semicolon at the end. It thinks that while count < 6 do nothing (; by itself is the null statement) and count never increases and your program loops forever. > { > printf("The value of count is %d\n", count); > count = count + 1; > } > > return 0; > } > > > But when I go and execute the compiled .exe in the /bin directory there is > no correct output displayed. I only get a cursor on the left side of the > screen. Any help will be appreciated. > >