Mail Archives: djgpp/1996/10/09/00:57:51
From: | Tony Sideris <tonys111 AT erols DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Trouble with getche()
|
Date: | Tue, 08 Oct 1996 20:39:02 -0700
|
Organization: | Erol's Internet Services
|
Lines: | 21
|
Message-ID: | <325B1E56.5BDA@erols.com>
|
Reply-To: | tonys111 AT erols DOT com
|
NNTP-Posting-Host: | col-as12s61.erols.com
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
I'm trying to do this simple little C thing, but it won't work right...I
copied it right out of a C book.
Here's what I type:
main()
{
char ch;
printf("Type a character: ");
ch = getche();
printf("\nYou typed: %c", ch);
}
After I compile it, I run it and the cursor just goes to next line
(which is blank) and does nothing. Then, for example, I type p it says:
pType a character:
You typed: p
This is my first day with djgpp so any help would be greatly
appreciated.
Thanx
-Tony
- Raw text -