Mail Archives: djgpp/2001/10/19/12:19:51
From: | "Bart van den Burg" <bart AT bart99 DOT tmfweb DOT nl>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | getkey()
|
Date: | Fri, 19 Oct 2001 18:09:24 +0200
|
Organization: | XO Communications B.V.
|
Lines: | 26
|
Message-ID: | <9qpj2s$96v$1@cyan.nl.gxn.net>
|
NNTP-Posting-Host: | asd-tel-ap02-d01-095.dial.freesurf.nl
|
X-Trace: | cyan.nl.gxn.net 1003507612 9439 62.100.14.95 (19 Oct 2001 16:06:52 GMT)
|
X-Complaints-To: | abuse AT freesurf DOT nl
|
NNTP-Posting-Date: | 19 Oct 2001 16:06:52 GMT
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Newsreader: | Microsoft Outlook Express 6.00.2600.0000
|
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
hi
I've got a problem with this function:
--------------------------------
void playGame() {
char x;
char y;
x = getkey();
char buffer[2];
sprintf(buffer, "%d", char(x));
regel(buffer, 80, 40, 1);
y = getkey();
sprintf(buffer, "%d", char(y));
regel(buffer, 80, 47, 1);
}
--------------------------------
regel() prints out what is inputted and has to be char* .
when I press, for example, "1", it says "49" instead of "1".
How can I fix this without changing the contents of the regel() function?
thx
Bart
- Raw text -