Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!math.fu-berlin.de!fub!kirste From: kirste@methan.chemie.fu-berlin.de (Burkhard Kirste) Newsgroups: comp.lang.c Subject: Re: getchar() Message-ID: Date: 12 Mar 91 15:56:44 GMT References: <1991Mar5.063644.8459@cs.mcgill.ca> <1991Mar5.220902.19196@ux1.cso.uiuc.edu> <1991Mar6.165835.10237@cs.mcgill.ca> <5CTOV6E@methan.chemie.fu-berlin.de> <176@3cpu.UUCP> Organization: Free University of Berlin, Organic Chemistry Lines: 25 edrury@3cpu.UUCP (Ed Drury) writes: >In article <5CTOV6E@methan.chemie.fu-berlin.de> kirste@methan.chemie.fu-berlin.de (Burkhard Kirste) writes: >>storm@cs.mcgill.ca (Marc WANDSCHNEIDER) writes: >> >>>> Your problem is that getchar() does not recognize ANY input until >>>>you hit Enter. > > oh yes, much more complicated, you have to use #include ^^^^^^^^^^^^^^^^^^^ >rather than #include -- but the question as I understand [stuff deleted] Well yes, but you forgot to mention that this is in no way all you would have to do under Unix. You would have to call initscr() in the beginning, endwin() in the end, and you have to replace your printf's by printw's. And you have to link the curses library, which gives you a lot of overhead if getch() is really all you need. Alternatively, you can avoid the whole curses stuff and change the terminal settings via ioctl(...) etc. -- |~| Freie Universitaet Berlin, Institut fuer Organische Chemie / \ Burkhard Kirste kirste@kristall.chemie.fu-berlin.dbp.de /FUB\ Takustrasse 3, D-1000 Berlin 33 UUCP: kirste@fub.uucp `---' Telefon: (030)838-6484 Telefax: (030)838-5163