Newsgroups: comp.os.msdos.djgpp Subject: Re: problem with readkey() From: vischne AT ibm DOT net-nospam (root) Organization: The Light References: <01bcda6c$d9e94d80$0200a8c0 AT ingo> MIME-Version: 1.0 Content-Type: Text/Plain; charset=US-ASCII NNTP-Posting-Host: 32.100.34.175 Message-ID: <3446ee86.0@news3.ibm.net> Date: 17 Oct 97 04:50:14 GMT Lines: 22 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article <01bcda6c$d9e94d80$0200a8c0 AT ingo>, ruhnke AT owl-online DOT de says... > >I got here some simple code which dosen't run as I expect it to work: > >#include <stdio.h> >#include <allegro.h> > >void main() >{ > allegro_init(); > install_keyboard(); > > if (readkey() == 'a') { > printf ("a was pressed"); > } else { > printf ("a wasn't pressed"); > } >} How about `if ((unsigned char)readkey() == 'a') {'