home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340
- From: dic5340@hertz.njit.edu (David Charlap)
- Newsgroups: comp.os.os2.programmer
- Subject: Re: C Set/2 Problem with getch()
- Message-ID: <1992Aug27.191812.25082@njitgw.njit.edu>
- Date: 27 Aug 92 19:18:12 GMT
- References: <5s-n5j.feustel@netcom.com> <1992Aug24.203004.2629@njitgw.njit.edu>
- Sender: news@njit.edu
- Organization: New Jersey Institute of Technology, Newark, N.J.
- Lines: 27
- Nntp-Posting-Host: hertz.njit.edu
-
- In article <1992Aug24.203004.2629@njitgw.njit.edu> dic5340@hertz.njit.edu (David Charlap) writes:
- >In article <5s-n5j.feustel@netcom.com> feustel@netcom.com (David Feustel) writes:
- >>I'm trying to use getch() in C Set/2 to read from the keyboard with no
- >>echo. Link386 reports getch() not found.
- >
- >According to the Unix box I have here, you should use getchar().
- >That's in <stdio.h>. The getch() function is a curses function and is
- >located in <cursesX.h>, a header/library that probably isn't available
- >for OS/2 yet, and certainly doesn't ship with C Set/2.
- >
- >I getch() is a common language extension, but it isn't ANSI. So
- >there's no gurantee that it should exist. Just because Microsoft and
- >Borland used it, doesn't mean that everyone does. (IBM's old C/2
- >compiler was MS-C repackaged)
-
- A correction to myself: C-Set/2 does indeed have getch(). It is
- located in the <conio.h> header, just like it is under Microsoft C.
- Sorry for the confusion. I assumed that since you used it before in a
- DOS compiler, that you had already included <conio.h>.
-
- Note that <conio.h> is non-ANSI, and shouldn't be used if you want
- your code to be completely portable.
- --
- |) David Charlap "I don't even represent myself
- /|_ dic5340@hertz.njit.edu sometimes so NJIT is right out!.
- ((|,)
- ~|~ Hi! I am a .signature virus, copy me into your .signature file.
-