On 12/08/10 08:53, Stewart Gordon wrote:
> On 08/12/2010 11:06, Nrgyzer wrote:
>> Hey guys,
>>
>> I'm writing a console based tool for windows. To receive the users
>> input, I
>> try to use getch() but the compiler always says "Error: undefined
>&
On 08/12/2010 13:25, Nrgyzer wrote:
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.
kbhit just tests whether there's a keystroke waiting in th
On 08/12/2010 11:06, Nrgyzer wrote:
Hey guys,
I'm writing a console based tool for windows. To receive the users input, I
try to use getch() but the compiler always says "Error: undefined identifier
getch". When I use getchar() it compiles successfully, but getchar() doesn
Great, thanks :)
On Wed, 08 Dec 2010 08:57:40 -0500, Steven Schveighoffer
wrote:
extern(C) int kbhit(void);
Um... sorry, D doesn't support void args (copy-paste problem):
extern(C) int kbhit();
-Steve
On Wed, 08 Dec 2010 08:25:38 -0500, Nrgyzer wrote:
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;
impo
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) {
On Wed, 08 Dec 2010 06:06:18 -0500, Nrgyzer wrote:
Hey guys,
I'm writing a console based tool for windows. To receive the users
input, I
try to use getch() but the compiler always says "Error: undefined
identifier
getch". When I use getchar() it compiles successful
Hey guys,
I'm writing a console based tool for windows. To receive the users input, I
try to use getch() but the compiler always says "Error: undefined identifier
getch". When I use getchar() it compiles successfully, but getchar() doesn't
returns after a single input.
Is