delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/07/06:09:06

From: jstacey AT plato DOT wadham DOT ox DOT ac DOT uk (J-P)
Newsgroups: comp.os.msdos.djgpp
Subject: getch() mysteriously defined
Date: 7 Jul 2000 10:13:50 +0100
Organization: Wadham College Oxford
Lines: 18
Message-ID: <8k470e$262$1@plato.wadham.ox.ac.uk>
NNTP-Posting-Host: plato.wadham.ox.ac.uk
X-Trace: news.ox.ac.uk 962961231 23651 163.1.164.74 (7 Jul 2000 09:13:51 GMT)
X-Complaints-To: newsmaster AT ox DOT ac DOT uk
NNTP-Posting-Date: 7 Jul 2000 09:13:51 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Does anyone know why this program works "as-is" i.e. with no extra
pre-compiler #include lines:

/*---------------------------*/

int main()
{
  getch();
}

/*---------------------------*/

If getch() is declared in conio.h (I think it's in grx20.h as part of the
GRX library, too), then how on earth can gcc under rhide compile the
program, and run it, and return the code of the keypress, without some
header file or other?

J-P

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019