read single characters from stdin

Thomas Koch thomas at koch.ro
Wed Sep 26 10:51:45 PDT 2012


Hi,

to learn D, I'd like to write a simple type trainer. It should write a line 
to stdout and then read single characters from stdin and only accept the 
correct characters

How can I read single characters?

A similar question has been asked before without a working answer:
http://forum.dlang.org/thread/jl79f7$2083$1@digitalmars.com

But I can't beliebe that there isn't a simple solution in D for this 
problem...

Regards, Thomas Koch


More information about the Digitalmars-d-learn mailing list