I need to create a simple password program where the program asks user to input password and when user inputs, it shows the characters as asterisks.
Every tutorial out there uses getch()
(in conio.h
). But I don't want to use it. Is there any easy alternative for doing so?
I'm using Windows 10.
P.S: Please don't confuse this to be a duplicate of this question: Alternative function in iostream.h for getch() of conio.h?
Because that question asks for holding screen output whereas I need to mask the input as asterisks.