+ 1
How to hide input in c++
I want to create an password type input, but how do you hide the text you have entered?
7 odpowiedzi
+ 2
int getch(void) Reads a character directly from the console without buffer, and without echo
so use getch instead of cin
+ 1
ok I think I got it, thanks!
+ 1
char a[10],ch;
for(int I=0;I<10;I++)
{
ch=getch();
a[I]=ch;
}
0
ok, how do you use it? can you show a small code?
0
just for example
0
you could just directly do a[I] = getch();
0
C++ hide in put passowrd