Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

console input

Status
Not open for further replies.

zildjohn01

Programmer
Sep 6, 2005
10
US
hi, i have a question about console input. i have tried the various functions such as

fread(&nextchar, 1, 1, stdin);
nextChar = getchar();
nextChar = _fgetchar();
etc...

and all seem to wait until the user presses 'enter' to start returning the chars to my program. is there any way to 1) turn off echoing input to the output, and 2) get chars before enter is pressed?
 
Yup.

But both those things require you to control the terminal device itself, and there's no standard interface for doing that in C. So to get a specific answer, you'll have to describe your platform.
 
o. i was hoping for something portable or within the c standard, but oh well. thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top