I’m trying to make a C++ program to read a password.
I made the program to cout *, not the characters I write but my problem is when I want to delete character because they’re wrong.
Example:
My constant password is 12345
If I enter 1235 the program will show **** and I have to delete the last character. It’s simple to remove it from the string but I want the last * to disappear from the console just as it happens when you introduce you windows password.
Is it possible? If it is, can someone explain how?
I’m trying to make a C++ program to read a password. I made the
Share
Outputting the backspace character ‘\b’ may help to move the output point back.
Specifically, outputting the string “\b \b” should blank out the last character output.