Mail Archives: djgpp/1997/11/03/05:47:48
From: | "John Estess" <jestess AT ebicom DOT net>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | PLEASEHELPgetchar
|
Date: | 1 Nov 1997 20:25:15 GMT
|
Organization: | EBI Comm, Internet Service Provider
|
Lines: | 21
|
Message-ID: | <01bce705$d5229f40$12d01ace@pjestess>
|
NNTP-Posting-Host: | pmox8.ebicom.net
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
I'm taking a C course by distance education from the U of Washington:
In an example, the DJGPP compiler blazes right through these three lines
without yn picking up the input value. I know this because I inserted a
print statement right after the second line and after the third (curious).
I also tried the getche fuction with the conio.h library, but it acted the
same. Since getche was supposed to be an unbuffered function, I was less
than impressed. The program worked under C++ Builder (trial edition), but I
really want to use DJGPP and I'm more than a little miffed that I can't
even input a single charactor. How is it done? According to the "Joy of C"
and the reference book for PowerC, this should work. Hell, it was given to
us as an example of how to do it! WAAAAAHHHH!
Please cc to my email - my news server bites.
printf ("\n Toss again? (Y/N)") ; /*prompt */
yn = getchar() ;
fflush (stdin) ;
John Estess - too stupid to know when to quit...
jestess AT ebicom DOT net
- Raw text -