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!

Hiding user input

Status
Not open for further replies.

alonex

Programmer
Jan 10, 2006
14
US
Hi,

I'm trying to hide user input (from keyboard-->using it to password)in win32 console application. I failed to manipulate getchar() and putchar() for that.
Is there a way to do it in C (or C++)?

Thanks,
Alonex
 
Yup, Visual C++ has a non-standard header <conio.h> which has function called getch() which gets a character (returned as an int) and doesn't echo it to the screen. The getche() function does the same thing, but does echo it to the screen.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top