0

how can we create stars instead of text in password column in c++

i mean to say that i have created a login password in c++ but i don't know how to make stars instead of text in password column like i have done in java

6th Feb 2017, 4:30 PM
LOKESH MAHAJAN
LOKESH MAHAJAN - avatar
4 Respostas
+ 12
Make it that for every input you get the '*' instead. It's not that hard, try it out
6th Feb 2017, 4:49 PM
Filip
Filip - avatar
+ 1
but how?? plz elaborate
6th Feb 2017, 5:28 PM
LOKESH MAHAJAN
LOKESH MAHAJAN - avatar
0
char s[20]; int i = 0; while(i < 20) { if (s[i] = _getch()) cout << "*"; i++; } you can modify it to your code, but the inside if statement is easy way to get it done.
7th Feb 2017, 6:58 AM
Chinmay Bhale
Chinmay Bhale - avatar