delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/03/15/03:30:17

From: "helen" <lab_darzo AT libero DOT it>
Newsgroups: comp.os.msdos.djgpp
Subject: does kbhit() works outside <PC.H> ???
Date: Sat, 15 Mar 2003 08:28:54 +0000 (UTC)
Organization: Mailgate.ORG Server - http://www.Mailgate.ORG
Lines: 44
Message-ID: <ea10a10d62eaa7aea05133d2c5488823.113557@mygate.mailgate.org>
NNTP-Posting-Host: host227-148.pool217223.interbusiness.it
X-Trace: news.mailgate.org 1047696048 6553 217.223.148.227 (Sat Mar 15 09:28:53 2003)
X-Complaints-To: abuse AT mailgate DOT org
NNTP-Posting-Date: Sat, 15 Mar 2003 08:28:54 +0000 (UTC)
Injector-Info: news.mailgate.org; posting-host=host227-148.pool217223.interbusiness.it; posting-account=113557; posting-date=1047696048
User-Agent: Mailgate Web Server
X-URL: http://mygate.mailgate.org/mynews/comp/comp.os.msdos.djgpp/ea10a10d62eaa7aea05133d2c5488823.113557%40mygate.mailgate.org
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I have DJGPP on win98 and win2k

if I write the following:

----
#include <stdio.h>
/*  DO-WHILE */
int main()
{
int x=0;

do {
	x=x+1;
	printf("%5d",x);
	rest(100);
} while (!kbhit());

return 0;
}
----

I wouldn't expect it to work (isn't kbhit() defined in <pc.h> ?)
but IT WORKS INSTEAD !

also if I add
#include <conio.h>

it also works and I do not need to use
_conio_kbhit()

other functions defined in conio.h also work, even if I don't include
the conio.h !!
Like:
clrscr(), or textcolor(); and also rest();

how do you explain that ?


helen (for once it works MORE than I need it to!!)


-- 
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

- Raw text -


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