Mail Archives: djgpp/1999/04/01/19:13:13
| Message-ID: | <37026DF6.BCAA8E59@cityweb.de>
|
| From: | David Renz <davidprrenz AT cityweb DOT de>
|
| X-Mailer: | Mozilla 4.03 [de] (Win95; I)
|
| MIME-Version: | 1.0
|
| Newsgroups: | comp.os.msdos.djgpp
|
| Subject: | DJGPP-Problem
|
| Lines: | 59
|
| Date: | Wed, 31 Mar 1999 20:48:23 +0200
|
| NNTP-Posting-Host: | 62.52.155.111
|
| X-Trace: | news1.cityweb.de 922907733 62.52.155.111 (Wed, 31 Mar 1999 21:15:33 MET DST)
|
| NNTP-Posting-Date: | Wed, 31 Mar 1999 21:15:33 MET DST
|
| To: | djgpp AT delorie DOT com
|
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
| Reply-To: | djgpp AT delorie DOT com
|
Hello,
I have a problem with DJGPP. I am working on a program which reads the
Input per Line. Here's the code:
.
.
.
char text[512][81];
char c,s;
int l[512],i,z;
printf ("\nHow many Lines ? ");
scanf ("%d", &z);
printf ("Text:\n");
for (i=0;i<z;++i)
{
fflush(stdin);
gets(text[i]);
l[i]=strlen(text[i]);
}
.
.
.
When I compile it with DJGPP and it should read n(z=n) Lines it only
reads n-1 lines. But when I compile it
with TurboC it runs correctly. Does someone know where there is a bug?
Greetings,
David
- Raw text -