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 Chriss 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
Joined
Jan 10, 2006
Messages
14
Location
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.
 
Thank you all,

Alonex
 
Status
Not open for further replies.

Similar threads

  • Locked
  • Question Question
Replies
4
Views
411
  • Locked
  • Question Question
Replies
3
Views
318
Replies
10
Views
550
  • Locked
  • Question Question
Replies
2
Views
246

Part and Inventory Search

Sponsor

Back
Top