How do I read one character from stdin? (getc in C)
    Adam D. Ruppe via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Sat Nov 14 13:54:03 PST 2015
    
    
  
BTW I was slightly inaccurate: it doesn't *require* a library to 
do this, you just need to disable buffering. But the getc 
function itself doing that is dependent on some library 
implementation.
On Windows for example you need to call this function and turn 
off line input:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms686033%28v=vs.85%29.aspx
On Unix it is this family of functions:
http://linux.die.net/man/3/tcsetattr
But regardless my library does this for you, so does ncurses, and 
a few others out there.
    
    
More information about the Digitalmars-d-learn
mailing list