undefined identifier getch()

Nrgyzer nrgyzer at gmail.com
Wed Dec 8 05:25:38 PST 2010


Okay, but what function can I use to get the pressed key?
kbhit/_kbhit seems to do what I want, but hwo can I use it in D? I
always get the error, that kbhit (or similar functions) are not
available.

import std.stdio;
import std.c.stdlib;
import std.c.windows.windows;

void main(string[] args) {
	kbhit();
	_kbhit();
}


More information about the Digitalmars-d-learn mailing list