| www.delorie.com/archives/browse.cgi | search |
| From: | "DeHackEd" <not DOT given AT out DOT net> |
| References: | <slrn70rpos DOT 5bh DOT user AT ts001d22 DOT cin-oh DOT concentric DOT net> |
| Subject: | Re: Strange DJGPP bug |
| Date: | Sun, 27 Sep 1998 18:19:01 -0400 |
| Lines: | 26 |
| Message-ID: | <#MnxYUm69GA.291@upnetnews05> |
| Newsgroups: | comp.os.msdos.djgpp |
| NNTP-Posting-Host: | d47-bn01-blvl-pdi.attcanada.net [142.194.131.47] |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
This happens due to data flushing. The system has no reason (don't ask me why?)
need to put the data on the screen yet. Use a \n to force data onto the screen,
or fflush(stdout);
--
"DeHackEd"
My Email address in the header is fake (spammers). Email me at this address:
http://www.geocities.com/cgi-bin/homestead/mail.pl?dehacked
#include <stdio.h>
int main()
{
char buffer[256];
printf("Input: ");
fflush(stdout);
fgets(buffer, 255, stdin);
printf("\nYou typed %s\n");
}
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |